package com.common.www.service.project;


import com.common.www.bean.entity.programme.PrecipitateDb;
import com.common.www.bean.entity.programme.PrecipitateSsdb;
import com.common.www.bean.entity.project.BiddingCompany;
import com.common.www.bean.entity.project.Project;
import com.common.www.bean.entity.project.SupplyCompany;
import com.common.www.bean.entity.tabulation.InnerBidBaseTabulation;
import com.common.www.bean.entity.tabulation.InnerTabulation;
import com.common.www.bean.entity.programme.TabulationExtracting;
import com.common.www.bean.entity.tabulation.OuterTabulation;
import com.common.www.bean.vo.*;
import com.common.www.service.programme.ComparativeAnalysisRemarkService;
import com.common.www.service.programme.PrecipitateDbService;
import com.common.www.service.programme.PrecipitateSsdbService;
import com.common.www.service.programme.TabulationExtractingService;
import com.common.www.service.tabulation.*;
import org.apache.commons.beanutils.BeanUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.poi.ss.usermodel.*;
import org.apache.poi.ss.util.CellRangeAddress;
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.lang.reflect.InvocationTargetException;
import java.math.BigDecimal;
import java.math.RoundingMode;
import java.util.*;
import java.util.stream.Collectors;

import static com.common.www.service.tabulation.InnerTabulationService.createCellAddStype;

@Service
@Transactional
public class StatisticalAnalysisService {

    @Autowired
    private InnerBidBaseTabulationService innerBidBaseTabulationService;
    @Autowired
    private OuterBidBaseTabulationService outerBidBaseTabulationService;
    @Autowired
    private InnerTabulationService innerTabulationService;
    @Autowired
    private OuterTabulationService outerTabulationService;
    @Autowired
    private SupplyCompanyService supplyCompanyService;
    @Autowired
    private ProjectService projectService;
    @Autowired
    private BiddingCompanyService biddingCompanyService;
    @Autowired
    private PrecipitateSsdbService precipitateSsdbService;
    @Autowired
    private PrecipitateDbService precipitateDbService;
    @Autowired
    private ComparativeAnalysisRemarkService comparativeAnalysisRemarkService;
    @Autowired
    private TabulationExtractingService extractingService;

    /**
     * 计算排名
     *
     * @param extractingList
     * @param extractingBdList
     * @return
     * @throws InvocationTargetException
     * @throws IllegalAccessException
     */
    public List<Map<String, Object>> getPaiMingList(List<TabulationExtracting> extractingList, List<TabulationExtracting> extractingBdList) throws InvocationTargetException, IllegalAccessException {
        List<Map<String, Object>> paiMingList = new ArrayList<>();
        TabulationExtracting innerBd = null;
        TabulationExtracting outerBd = null;
        BigDecimal hsBaoJiaBdZongHe = BigDecimal.ZERO; // 初始化为0
        BigDecimal hsBaoJiaInner = BigDecimal.ZERO; // 初始化为0
        BigDecimal hsBaoJiaOuter = BigDecimal.ZERO; // 初始化为0
        for (TabulationExtracting bd : extractingBdList) {
            if (bd.getInnerOuterType() == 1) {
                innerBd = bd;
                hsBaoJiaInner = innerBd.getHsBaoJia();
            } else {
                outerBd = bd;
                hsBaoJiaOuter = outerBd.getHsBaoJia();
            }
        }
        hsBaoJiaBdZongHe = hsBaoJiaInner.add(hsBaoJiaOuter);

        //按阶段从小到大排序，以便下一轮从上一轮中拿值
        Collections.sort(extractingList, new Comparator<TabulationExtracting>() {
            @Override
            public int compare(TabulationExtracting o1, TabulationExtracting o2) {
                return o1.getJieDuan().compareTo(o2.getJieDuan());
            }
        });
        //回标1到回标4的内外线数据按供应商分组
        Map<Long, List<TabulationExtracting>> nameList = extractingList.stream().collect(Collectors.groupingBy(vo -> vo.getSupplyCompany().getId()));
        for (Map.Entry<Long, List<TabulationExtracting>> item : nameList.entrySet()) {
            List<TabulationExtracting> value = item.getValue();

            Map<String, Object> tempMap = new HashMap<>();
            StatisticalBiddingVo tempInner1 = new StatisticalBiddingVo();
            StatisticalBiddingVo tempInner2 = new StatisticalBiddingVo();
            StatisticalBiddingVo tempInner3 = new StatisticalBiddingVo();
            StatisticalBiddingVo tempInner4 = new StatisticalBiddingVo();
            StatisticalBiddingVo tempOuter1 = new StatisticalBiddingVo();
            StatisticalBiddingVo tempOuter2 = new StatisticalBiddingVo();
            StatisticalBiddingVo tempOuter3 = new StatisticalBiddingVo();
            StatisticalBiddingVo tempOuter4 = new StatisticalBiddingVo();
            StatisticalBiddingVo tempItem1 = new StatisticalBiddingVo();
            StatisticalBiddingVo tempItem2 = new StatisticalBiddingVo();
            StatisticalBiddingVo tempItem3 = new StatisticalBiddingVo();
            StatisticalBiddingVo tempItem4 = new StatisticalBiddingVo();
            //区分内外线排名，筛选出每一轮的排名
            for (TabulationExtracting extracting : value) {
                if (extracting.getInnerOuterType() == 1) {
                    if (extracting.getJieDuan() == 2) {
                        List<TabulationExtracting> tabulationExtractingList = extractingService.getRepository().findByFlagAndProjectIdAndJieDuanAndInnerOuterType(1, extracting.getProject().getId(), 2, 1);
                        tempInner1 = getPaiMing(tabulationExtractingList, extracting, innerBd);
                    }
                    if (extracting.getJieDuan() == 3) {
                        List<TabulationExtracting> tabulationExtractingList = extractingService.getRepository().findByFlagAndProjectIdAndJieDuanAndInnerOuterType(1, extracting.getProject().getId(), 3, 1);
                        tempInner2 = getPaiMing(tabulationExtractingList, extracting, innerBd);
                        BigDecimal chaYiLv = BigDecimal.ZERO;
                        if (tempInner1.getHsxzBaoJia() != null && tempInner1.getHsxzBaoJia().longValue() > 0) {
                            chaYiLv = extracting.getHsxzBaoJia().subtract(tempInner1.getHsxzBaoJia()).divide(tempInner1.getHsxzBaoJia(), RoundingMode.HALF_UP);
                        }
                        tempInner2.setChaYiLv(chaYiLv);
                    }
                    if (extracting.getJieDuan() == 4) {
                        List<TabulationExtracting> tabulationExtractingList = extractingService.getRepository().findByFlagAndProjectIdAndJieDuanAndInnerOuterType(1, extracting.getProject().getId(), 4, 1);
                        tempInner3 = getPaiMing(tabulationExtractingList, extracting, innerBd);
                        BigDecimal chaYiLv = BigDecimal.ZERO;
                        if (tempInner2.getHsxzBaoJia() != null && tempInner2.getHsxzBaoJia().longValue() > 0) {
                            chaYiLv = extracting.getHsxzBaoJia().subtract(tempInner2.getHsxzBaoJia()).divide(tempInner2.getHsxzBaoJia(), RoundingMode.HALF_UP);
                        }
                        tempInner3.setChaYiLv(chaYiLv);
                    }
                    if (extracting.getJieDuan() == 5) {
                        List<TabulationExtracting> tabulationExtractingList = extractingService.getRepository().findByFlagAndProjectIdAndJieDuanAndInnerOuterType(1, extracting.getProject().getId(), 5, 1);
                        tempInner4 = getPaiMing(tabulationExtractingList, extracting, innerBd);
                        BigDecimal chaYiLv = BigDecimal.ZERO;
                        if (tempInner3.getHsxzBaoJia() != null && tempInner3.getHsxzBaoJia().longValue() > 0) {
                            chaYiLv = extracting.getHsxzBaoJia().subtract(tempInner3.getHsxzBaoJia()).divide(tempInner3.getHsxzBaoJia(), RoundingMode.HALF_UP);
                        }
                        tempInner4.setChaYiLv(chaYiLv);
                    }
                }
                if (extracting.getInnerOuterType() == 2) {
                    if (extracting.getJieDuan() == 2) {
                        List<TabulationExtracting> tabulationExtractingList = extractingService.getRepository().findByFlagAndProjectIdAndJieDuanAndInnerOuterType(1, extracting.getProject().getId(), 2, 2);
                        tempOuter1 = getPaiMing(tabulationExtractingList, extracting, outerBd);
                    }
                    if (extracting.getJieDuan() == 3) {
                        List<TabulationExtracting> tabulationExtractingList = extractingService.getRepository().findByFlagAndProjectIdAndJieDuanAndInnerOuterType(1, extracting.getProject().getId(), 3, 2);
                        tempOuter2 = getPaiMing(tabulationExtractingList, extracting, outerBd);
                        BigDecimal chaYiLv = BigDecimal.ZERO;
                        if (tempOuter1.getHsxzBaoJia() != null && tempOuter1.getHsxzBaoJia().longValue() > 0) {
                            chaYiLv = extracting.getHsxzBaoJia().subtract(tempOuter1.getHsxzBaoJia()).divide(tempOuter1.getHsxzBaoJia(), RoundingMode.HALF_UP);
                        }
                        tempOuter2.setChaYiLv(chaYiLv);
                    }
                    if (extracting.getJieDuan() == 4) {
                        List<TabulationExtracting> tabulationExtractingList = extractingService.getRepository().findByFlagAndProjectIdAndJieDuanAndInnerOuterType(1, extracting.getProject().getId(), 4, 2);
                        tempOuter3 = getPaiMing(tabulationExtractingList, extracting, outerBd);
                        BigDecimal chaYiLv = BigDecimal.ZERO;
                        if (tempOuter2.getHsxzBaoJia() != null && tempOuter2.getHsxzBaoJia().longValue() > 0) {
                            chaYiLv = extracting.getHsxzBaoJia().subtract(tempOuter2.getHsxzBaoJia()).divide(tempOuter2.getHsxzBaoJia(), RoundingMode.HALF_UP);
                        }
                        tempOuter3.setChaYiLv(chaYiLv);
                    }
                    if (extracting.getJieDuan() == 5) {
                        List<TabulationExtracting> tabulationExtractingList = extractingService.getRepository().findByFlagAndProjectIdAndJieDuanAndInnerOuterType(1, extracting.getProject().getId(), 5, 2);
                        tempOuter4 = getPaiMing(tabulationExtractingList, extracting, outerBd);
                        BigDecimal chaYiLv = BigDecimal.ZERO;
                        if (tempOuter3.getHsxzBaoJia() != null && tempOuter3.getHsxzBaoJia().longValue() > 0) {
                            chaYiLv = extracting.getHsxzBaoJia().subtract(tempOuter3.getHsxzBaoJia()).divide(tempOuter3.getHsxzBaoJia(), RoundingMode.HALF_UP);
                        }
                        tempOuter4.setChaYiLv(chaYiLv);
                    }
                }
            }
            //综合排名
            Map<Integer, List<TabulationExtracting>> valueList = value.stream().collect(Collectors.groupingBy(TabulationExtracting::getJieDuan));
            for (Map.Entry<Integer, List<TabulationExtracting>> itemZongHe : valueList.entrySet()) {
                Integer jieDuan = itemZongHe.getKey();
                List<TabulationExtracting> valueZongHe = itemZongHe.getValue();
                BigDecimal innerHsBaoJia = BigDecimal.ZERO;
                BigDecimal outerHsBaoJia = BigDecimal.ZERO;
                BigDecimal innerHsxzBaoJia = BigDecimal.ZERO;
                BigDecimal outerHsxzBaoJia = BigDecimal.ZERO;
                for (TabulationExtracting s : valueZongHe) {
                    if (s.getInnerOuterType() == 1) {
                        innerHsBaoJia = s.getHsBaoJia();
                        innerHsxzBaoJia = s.getHsxzBaoJia();
                    }
                    if (s.getInnerOuterType() == 2) {
                        outerHsBaoJia = s.getHsBaoJia();
                        outerHsxzBaoJia = s.getHsxzBaoJia();
                    }
                }
                //数据准备-内外线相加
//                BigDecimal hsBaoJiaZongHe = innerHsBaoJia.add(outerHsBaoJia);
                BigDecimal hsxzBaoJiaZongHe = innerHsxzBaoJia.add(outerHsxzBaoJia);
//                BigDecimal bhsBaoJiaZongHe = hsBaoJiaZongHe.divide(valueZongHe.get(0).getShuiLv().add(BigDecimal.ONE), 2, RoundingMode.HALF_UP);

                if (jieDuan == 2) {
                    List<TabulationExtracting> tabulationExtractingList = extractingService.getRepository().findByFlagAndProjectIdAndJieDuan(1, valueZongHe.get(0).getProject().getId(), 2);
                    //计算内外线加在一起的报价
                    List<StatisticalBiddingVo> calculateZongHebjList = getZongHeCalculate(tabulationExtractingList);
                    tempItem1 = getZongHePaiMing(calculateZongHebjList, valueZongHe, hsBaoJiaBdZongHe);
                }
                if (jieDuan == 3) {
                    List<TabulationExtracting> tabulationExtractingList = extractingService.getRepository().findByFlagAndProjectIdAndJieDuan(1, valueZongHe.get(0).getProject().getId(), 3);
                    //计算内外线加在一起的报价
                    List<StatisticalBiddingVo> calculateZongHebjList = getZongHeCalculate(tabulationExtractingList);
                    tempItem2 = getZongHePaiMing(calculateZongHebjList, valueZongHe, hsBaoJiaBdZongHe);
                    BigDecimal chaYiLv = BigDecimal.ZERO;
                    if (tempItem1.getHsxzBaoJia() != null && tempItem1.getHsxzBaoJia().longValue() > 0) {
                        chaYiLv = hsxzBaoJiaZongHe.subtract(tempItem1.getHsxzBaoJia()).divide(tempItem1.getHsxzBaoJia(), RoundingMode.HALF_UP);
                    }
                    tempItem2.setChaYiLv(chaYiLv);
                }
                if (jieDuan == 4) {
                    List<TabulationExtracting> tabulationExtractingList = extractingService.getRepository().findByFlagAndProjectIdAndJieDuan(1, valueZongHe.get(0).getProject().getId(), 4);
                    //计算内外线加在一起的报价
                    List<StatisticalBiddingVo> calculateZongHebjList = getZongHeCalculate(tabulationExtractingList);
                    tempItem3 = getZongHePaiMing(calculateZongHebjList, valueZongHe, hsBaoJiaBdZongHe);
                    BigDecimal chaYiLv = BigDecimal.ZERO;
                    if (tempItem2.getHsxzBaoJia() != null && tempItem2.getHsxzBaoJia().longValue() > 0) {
                        chaYiLv = hsxzBaoJiaZongHe.subtract(tempItem2.getHsxzBaoJia()).divide(tempItem2.getHsxzBaoJia(), RoundingMode.HALF_UP);
                    }
                    tempItem3.setChaYiLv(chaYiLv);
                }
                if (jieDuan == 5) {
                    List<TabulationExtracting> tabulationExtractingList = extractingService.getRepository().findByFlagAndProjectIdAndJieDuan(1, valueZongHe.get(0).getProject().getId(), 5);
                    //计算内外线加在一起的报价
                    List<StatisticalBiddingVo> calculateZongHebjList = getZongHeCalculate(tabulationExtractingList);
                    tempItem4 = getZongHePaiMing(calculateZongHebjList, valueZongHe, hsBaoJiaBdZongHe);
                    BigDecimal chaYiLv = BigDecimal.ZERO;
                    if (tempItem3.getHsxzBaoJia() != null && tempItem3.getHsxzBaoJia().longValue() > 0) {
                        chaYiLv = hsxzBaoJiaZongHe.subtract(tempItem3.getHsxzBaoJia()).divide(tempItem3.getHsxzBaoJia(), RoundingMode.HALF_UP);
                    }
                    tempItem4.setChaYiLv(chaYiLv);
                }
            }

            tempMap.put("supplyCompany", value.get(0).getSupplyCompany());
            tempMap.put("innerBid", innerBd);
            tempMap.put("outerBid", outerBd);
            tempMap.put("tempInner1", tempInner1);
            tempMap.put("tempInner2", tempInner2);
            tempMap.put("tempInner3", tempInner3);
            tempMap.put("tempInner4", tempInner4);
            tempMap.put("tempOuter1", tempOuter1);
            tempMap.put("tempOuter2", tempOuter2);
            tempMap.put("tempOuter3", tempOuter3);
            tempMap.put("tempOuter4", tempOuter4);
            tempMap.put("tempItem1", tempItem1);
            tempMap.put("tempItem2", tempItem2);
            tempMap.put("tempItem3", tempItem3);
            tempMap.put("tempItem4", tempItem4);
            paiMingList.add(tempMap);
        }
        return paiMingList;
    }


    /**
     * 导出高低压商务排名
     *
     * @param pmList
     * @return
     */
    public XSSFWorkbook exportPaiMing(List<Map<String, Object>> pmList, Project project) {
        //数据及格式准备和转换
        TabulationExtracting innerBd = null;
        TabulationExtracting outerBd = null;
        List<StatisticalBiddingVo> tempInner1List = new ArrayList<>();
        List<StatisticalBiddingVo> tempInner2List = new ArrayList<>();
        List<StatisticalBiddingVo> tempInner3List = new ArrayList<>();
        List<StatisticalBiddingVo> tempInner4List = new ArrayList<>();
        List<StatisticalBiddingVo> tempOuter1List = new ArrayList<>();
        List<StatisticalBiddingVo> tempOuter2List = new ArrayList<>();
        List<StatisticalBiddingVo> tempOuter3List = new ArrayList<>();
        List<StatisticalBiddingVo> tempOuter4List = new ArrayList<>();
        List<StatisticalBiddingVo> tempItem1List = new ArrayList<>();
        List<StatisticalBiddingVo> tempItem2List = new ArrayList<>();
        List<StatisticalBiddingVo> tempItem3List = new ArrayList<>();
        List<StatisticalBiddingVo> tempItem4List = new ArrayList<>();
        List<SupplyCompany> companyList = new ArrayList<>();
        if (pmList.size() > 0) {
            innerBd = (TabulationExtracting) pmList.get(0).get("innerBid");
            outerBd = (TabulationExtracting) pmList.get(0).get("outerBid");
            for (int j = 0; j < pmList.size(); j++) {
                Object company = pmList.get(j).get("supplyCompany");
                if (company instanceof SupplyCompany) {
                    SupplyCompany tempCompany = (SupplyCompany) company;
                    companyList.add(tempCompany);
                }
                //内线
                Object objInner1 = pmList.get(j).get("tempInner1");
                if (objInner1 instanceof StatisticalBiddingVo) {
                    StatisticalBiddingVo temp = (StatisticalBiddingVo) objInner1;
                    tempInner1List.add(temp);
                }
                Object objInner2 = pmList.get(j).get("tempInner2");
                if (objInner2 instanceof StatisticalBiddingVo) {
                    StatisticalBiddingVo temp = (StatisticalBiddingVo) objInner2;
                    tempInner2List.add(temp);
                }
                Object objInner3 = pmList.get(j).get("tempInner3");
                if (objInner3 instanceof StatisticalBiddingVo) {
                    StatisticalBiddingVo temp = (StatisticalBiddingVo) objInner3;
                    tempInner3List.add(temp);
                }
                Object objInner4 = pmList.get(j).get("tempInner4");
                if (objInner4 instanceof StatisticalBiddingVo) {
                    StatisticalBiddingVo temp = (StatisticalBiddingVo) objInner4;
                    tempInner4List.add(temp);
                }
                //外线
                Object objOuter1 = pmList.get(j).get("tempOuter1");
                if (objOuter1 instanceof StatisticalBiddingVo) {
                    StatisticalBiddingVo temp = (StatisticalBiddingVo) objOuter1;
                    tempOuter1List.add(temp);
                }
                Object objOuter2 = pmList.get(j).get("tempOuter2");
                if (objOuter2 instanceof StatisticalBiddingVo) {
                    StatisticalBiddingVo temp = (StatisticalBiddingVo) objOuter2;
                    tempOuter2List.add(temp);
                }
                Object objOuter3 = pmList.get(j).get("tempOuter3");
                if (objOuter3 instanceof StatisticalBiddingVo) {
                    StatisticalBiddingVo temp = (StatisticalBiddingVo) objOuter3;
                    tempOuter3List.add(temp);
                }
                Object objOuter4 = pmList.get(j).get("tempOuter4");
                if (objOuter4 instanceof StatisticalBiddingVo) {
                    StatisticalBiddingVo temp = (StatisticalBiddingVo) objOuter4;
                    tempOuter4List.add(temp);
                }
                //综合
                Object objItem1 = pmList.get(j).get("tempItem1");
                if (objItem1 instanceof StatisticalBiddingVo) {
                    StatisticalBiddingVo temp = (StatisticalBiddingVo) objItem1;
                    tempItem1List.add(temp);
                }
                Object objItem2 = pmList.get(j).get("tempItem2");
                if (objItem2 instanceof StatisticalBiddingVo) {
                    StatisticalBiddingVo temp = (StatisticalBiddingVo) objItem2;
                    tempItem2List.add(temp);
                }
                Object objItem3 = pmList.get(j).get("tempItem3");
                if (objItem3 instanceof StatisticalBiddingVo) {
                    StatisticalBiddingVo temp = (StatisticalBiddingVo) objItem3;
                    tempItem3List.add(temp);
                }
                Object objItem4 = pmList.get(j).get("tempItem4");
                if (objItem4 instanceof StatisticalBiddingVo) {
                    StatisticalBiddingVo temp = (StatisticalBiddingVo) objItem4;
                    tempItem4List.add(temp);
                }

            }
        }
        XSSFWorkbook workbook = new XSSFWorkbook();
        for (int i = 0; i < 4; i++) {
            List<StatisticalBiddingVo> tempInnerList = new ArrayList<>();
            List<StatisticalBiddingVo> tempOuterList = new ArrayList<>();
            List<StatisticalBiddingVo> tempItemList = new ArrayList<>();
            Sheet sheet = null;
            if (i == 0) {
                sheet = workbook.createSheet("回标1");
                tempInnerList = tempInner1List;
                tempOuterList = tempOuter1List;
                tempItemList = tempItem1List;
            }
            if (i == 1) {
                sheet = workbook.createSheet("回标2");
                tempInnerList = tempInner2List;
                tempOuterList = tempOuter2List;
                tempItemList = tempItem2List;
            }
            if (i == 2) {
                sheet = workbook.createSheet("回标3");
                tempInnerList = tempInner3List;
                tempOuterList = tempOuter3List;
                tempItemList = tempItem3List;
            }
            if (i == 3) {
                sheet = workbook.createSheet("回标4");
                tempInnerList = tempInner4List;
                tempOuterList = tempOuter4List;
                tempItemList = tempItem4List;
            }
            CellStyle cellStyle = workbook.createCellStyle();
            cellStyle.setAlignment(HorizontalAlignment.CENTER); // 居中
            cellStyle.setVerticalAlignment(VerticalAlignment.CENTER); // 居中
            // 创建日期格式
            CellStyle cellDateStyle = workbook.createCellStyle();
            CreationHelper createHelper = workbook.getCreationHelper();
            cellDateStyle.setDataFormat(createHelper.createDataFormat().getFormat("yyyy-mm-dd hh:mm:ss"));
            Row row0 = sheet.createRow(0);
            createCellAddStype(row0, 0, cellStyle).setCellValue("招标过程评审汇总表");

            CellRangeAddress titleRegion = new CellRangeAddress(0, 0, 0, pmList.size() != 0 ? pmList.size() + 2 : 22);// 下标从0开始 起始行号，终止行号， 起始列号，终
            sheet.addMergedRegionUnsafe(titleRegion);
            //边框
            cellStyle.setBorderBottom(BorderStyle.THIN); //下边框
            cellStyle.setBorderLeft(BorderStyle.THIN);//左边框
            cellStyle.setBorderTop(BorderStyle.THIN);//上边框
            cellStyle.setBorderRight(BorderStyle.THIN);//右边框
            cellDateStyle.setBorderBottom(BorderStyle.THIN); //下边框
            cellDateStyle.setBorderLeft(BorderStyle.THIN);//左边框
            cellDateStyle.setBorderTop(BorderStyle.THIN);//上边框
            cellDateStyle.setBorderRight(BorderStyle.THIN);//右边框

            Row row1 = sheet.createRow(1);
            createCellAddStype(row1, 0, cellStyle).setCellValue("项目");
            createCellAddStype(row1, 1, cellStyle).setCellValue(project.getName());
            Row row2 = sheet.createRow(2);
            createCellAddStype(row2, 0, cellStyle).setCellValue("类别");
            createCellAddStype(row2, 1, cellStyle).setCellValue("标底");
            createCellAddStype(row2, 2, cellStyle).setCellValue("投标单位");
            int indexB = 3;
            for (int j = 0; j < companyList.size(); j++) {
                createCellAddStype(row2, indexB++, cellStyle).setCellValue(companyList.get(j).getName());
            }


            Integer rowIndex1 = 3;
            for (int j = 0; j < 5; j++) {
                Row row = sheet.createRow(rowIndex1);
                createCellAddStype(row, 0, cellStyle).setCellValue("综合排名");
                createCellAddStype(row, 1, cellStyle).setCellValue("/");
                if (j == 0) {
                    createCellAddStype(row, 2, cellStyle).setCellValue("含税报价");
                }
                if (j == 1) {
                    createCellAddStype(row, 2, cellStyle).setCellValue("排名");
                }
                if (j == 2) {
                    createCellAddStype(row, 2, cellStyle).setCellValue("不含税报价与最低价%");
                }
                if (j == 3) {
                    createCellAddStype(row, 2, cellStyle).setCellValue("不含税报价与标底价%");
                }
                if (j == 4) {
                    createCellAddStype(row, 2, cellStyle).setCellValue("较上一轮差异率%");
                }
                int indexC = 3;
                for (StatisticalBiddingVo item : tempItemList) {
                    if (j == 0) {
                        createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getHsBaoJia() != null ? item.getHsBaoJia().toString() : "");
                    }
                    if (j == 1) {
                        createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getPaiMing() != null ? item.getPaiMing().toString() : "");
                    }
                    if (j == 2) {
                        createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getBhszdLv() != null ? item.getBhszdLv().toString() : "");
                    }
                    if (j == 3) {
                        createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getBhsbdLv() != null ? item.getBhsbdLv().toString() : "");
                    }
                    if (j == 4) {
                        createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getChaYiLv() != null ? item.getChaYiLv().toString() : "");
                    }
                }
                rowIndex1++;
            }

            Integer rowIndex2 = 8;
            for (int j = 0; j < 5; j++) {
                Row row = sheet.createRow(rowIndex2);
                createCellAddStype(row, 0, cellStyle).setCellValue("内线排名");
                if (j == 0) {
                    createCellAddStype(row, 1, cellStyle).setCellValue((innerBd != null && innerBd.getHsBaoJia() != null) ? innerBd.getHsBaoJia().toString() : "");
                    createCellAddStype(row, 2, cellStyle).setCellValue("含税报价");
                }
                if (j == 1) {
                    createCellAddStype(row, 1, cellStyle).setCellValue("/");
                    createCellAddStype(row, 2, cellStyle).setCellValue("排名");
                }
                if (j == 2) {
                    createCellAddStype(row, 1, cellStyle).setCellValue("/");
                    createCellAddStype(row, 2, cellStyle).setCellValue("不含税报价与最低价%");
                }
                if (j == 3) {
                    createCellAddStype(row, 1, cellStyle).setCellValue("/");
                    createCellAddStype(row, 2, cellStyle).setCellValue("不含税报价与标底价%");
                }
                if (j == 4) {
                    createCellAddStype(row, 1, cellStyle).setCellValue("/");
                    createCellAddStype(row, 2, cellStyle).setCellValue("较上一轮差异率%");
                }
                int indexC = 3;
                for (StatisticalBiddingVo item : tempInnerList) {
                    if (j == 0) {
                        createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getHsBaoJia() != null ? item.getHsBaoJia().toString() : "");
                    }
                    if (j == 1) {
                        createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getPaiMing() != null ? item.getPaiMing().toString() : "");
                    }
                    if (j == 2) {
                        createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getBhszdLv() != null ? item.getBhszdLv().toString() : "");
                    }
                    if (j == 3) {
                        createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getBhsbdLv() != null ? item.getBhsbdLv().toString() : "");
                    }
                    if (j == 4) {
                        createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getChaYiLv() != null ? item.getChaYiLv().toString() : "");
                    }
                }
                rowIndex2++;
            }

            Integer rowIndex3 = 13;
            for (int j = 0; j < 5; j++) {
                Row row = sheet.createRow(rowIndex3);
                createCellAddStype(row, 0, cellStyle).setCellValue("外线排名");
                if (j == 0) {
                    createCellAddStype(row, 1, cellStyle).setCellValue((outerBd != null && outerBd.getHsBaoJia() != null) ? outerBd.getHsBaoJia().toString() : "");
                    createCellAddStype(row, 2, cellStyle).setCellValue("含税报价");
                }
                if (j == 1) {
                    createCellAddStype(row, 1, cellStyle).setCellValue("/");
                    createCellAddStype(row, 2, cellStyle).setCellValue("排名");
                }
                if (j == 2) {
                    createCellAddStype(row, 1, cellStyle).setCellValue("/");
                    createCellAddStype(row, 2, cellStyle).setCellValue("不含税报价与最低价%");
                }
                if (j == 3) {
                    createCellAddStype(row, 1, cellStyle).setCellValue("/");
                    createCellAddStype(row, 2, cellStyle).setCellValue("不含税报价与标底价%");
                }
                if (j == 4) {
                    createCellAddStype(row, 1, cellStyle).setCellValue("/");
                    createCellAddStype(row, 2, cellStyle).setCellValue("较上一轮差异率%");
                }
                int indexC = 3;
                for (StatisticalBiddingVo item : tempOuterList) {
                    if (j == 0) {
                        createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getHsBaoJia() != null ? item.getHsBaoJia().toString() : "");
                    }
                    if (j == 1) {
                        createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getPaiMing() != null ? item.getPaiMing().toString() : "");
                    }
                    if (j == 2) {
                        createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getBhszdLv() != null ? item.getBhszdLv().toString() : "");
                    }
                    if (j == 3) {
                        createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getBhsbdLv() != null ? item.getBhsbdLv().toString() : "");
                    }
                    if (j == 4) {
                        createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getChaYiLv() != null ? item.getChaYiLv().toString() : "");
                    }
                }
                rowIndex3++;
            }
            CellRangeAddress cra1 = new CellRangeAddress(3, 7, 0, 0);
            CellRangeAddress cra2 = new CellRangeAddress(8, 12, 0, 0);
            CellRangeAddress cra3 = new CellRangeAddress(13, 17, 0, 0);
            CellRangeAddress cra4 = new CellRangeAddress(3, 7, 1, 1);
            //在sheet里增加合并单元格
            sheet.addMergedRegion(cra1);
            sheet.addMergedRegion(cra2);
            sheet.addMergedRegion(cra3);
            sheet.addMergedRegion(cra4);
        }
        return workbook;
    }


    public String getFenLeiName(Integer fenLei) {
        if (fenLei == null) {
            return "未知";
        }
        switch (fenLei) {
            case 1:
                return "直流屏";
            case 2:
                return "高压开关柜";
            case 3:
                return "低压开关柜";
            case 4:
                return "母线槽";
            case 5:
                return "变压器";
            case 6:
                return "10kv高压电缆";
            case 7:
                return "架空线";
            case 8:
                return "低压电缆";
            case 9:
                return "预分支电缆";
            case 10:
                return "电表箱";
            case 11:
                return "配电箱";
            case 12:
                return "电表";
            case 13:
                return "高压桥架";
            case 14:
                return "调试";
            case 15:
                return "电缆通道";
            case 16:
                return "电杆";
            case 17:
                return "手续费";
            case 18:
                return "措施费";
            case 19:
                return "其他";
        }
        return "未知";
    }


    /**
     * 纵向对比、计算差异率
     *
     * @param companyList
     * @param projectId
     * @param jieDuan
     * @return
     */
    public List<VerticalStatisCollectVo> getVerticalStatis(List<BiddingCompany> companyList, Long projectId, Integer jieDuan) {
        Project project = companyList.get(0).getProject();
        List<InnerBidBaseTabulation> innerBidBaseTabulationList = innerBidBaseTabulationService.getRepository().findByFlagAndProjectIdAndBidType(1, projectId, 1);
        List<VerticalStatisVo> bdVoList = new ArrayList<>();
        // 对比分析时所需分析分类：变压器、低压柜、调试、高压电缆、高压柜、其他、手续费、低压电缆、配电箱、电表、电表箱、母线槽
        Map<String, List<InnerBidBaseTabulation>> fenLeiList = innerBidBaseTabulationList.stream().collect(Collectors.groupingBy(InnerBidBaseTabulation::getFenXiFenLei));
        for (Map.Entry<String, List<InnerBidBaseTabulation>> item : fenLeiList.entrySet()) {
            String fenXiFenLei = item.getKey();
            List<InnerBidBaseTabulation> value = item.getValue();
            VerticalStatisVo bdVo = new VerticalStatisVo();
            BigDecimal gongChengLiang = BigDecimal.ZERO;
            BigDecimal totalPrice = BigDecimal.ZERO;
            String unit = value.get(0).getUnit();
            //1.调试、手续费、其他的工程量在这里分析都是固定为1
            //2.综合合价(表格中原始值)那里为0或为空，则工程量在这里是不统计的，对比时的综合单价和合计以表格中的原始值进行计算
            //3.unit单位按对应模板表设置
            if ("调试".equals(fenXiFenLei) || "手续费".equals(fenXiFenLei) || "其他".equals(fenXiFenLei)) {
                unit = "项";
                gongChengLiang = BigDecimal.ONE;
                for (InnerBidBaseTabulation bidBaseTabulation : value) {
                    if (bidBaseTabulation.getTotalPriceOriginal() != null && bidBaseTabulation.getTotalPriceOriginal().compareTo(BigDecimal.ZERO) != 0) {
                        totalPrice = totalPrice.add(bidBaseTabulation.getTotalPriceOriginal());
                    }
                }
            } else {
                for (InnerBidBaseTabulation bidBaseTabulation : value) {
                    if (bidBaseTabulation.getTotalPriceOriginal() != null && bidBaseTabulation.getTotalPriceOriginal().compareTo(BigDecimal.ZERO) != 0) {
                        // 返回的是double类型，需要转换成BigDecimal
                        gongChengLiang = gongChengLiang.add(BigDecimal.valueOf(bidBaseTabulation.getGongChengLiang()).setScale(2, RoundingMode.HALF_UP));
                        totalPrice = totalPrice.add(bidBaseTabulation.getTotalPriceOriginal());
                    }
                }
            }
            if ("高压柜".equals(fenXiFenLei) || "低压柜".equals(fenXiFenLei) || "变压器".equals(fenXiFenLei)) {
                unit = "台";
            }
            if ("母线槽".equals(fenXiFenLei) || "高压电缆".equals(fenXiFenLei) || "低压电缆".equals(fenXiFenLei)) {
                unit = "m";
            }
            if ("电表箱".equals(fenXiFenLei) || "配电箱".equals(fenXiFenLei)) {
                unit = "套";
            }
            if ("电表".equals(fenXiFenLei)) {
                unit = "个";
            }

            bdVo.setSort(1);
            bdVo.setBiddingName("标底");
//            bdVo.setFenLeiName(getFenLeiName(fenLei));
            bdVo.setFenXiFenLei(fenXiFenLei);
            bdVo.setUnit(unit);
            bdVo.setGongChengLiang(gongChengLiang);
            bdVo.setTotalPriceCalculate(totalPrice);
            if (gongChengLiang != null && gongChengLiang.compareTo(BigDecimal.ZERO) != 0) {
                bdVo.setComprehensivePriceCalculate(totalPrice.divide(new BigDecimal(gongChengLiang.toString()), RoundingMode.HALF_UP));
            }
            bdVoList.add(bdVo);
        }

        List<VerticalStatisVo> gsVoList = new ArrayList<>();
        Integer sort = 1;
        for (BiddingCompany company : companyList) {
            List<InnerTabulation> innerTabulationList = innerTabulationService.getRepository().findByFlagAndBiddingCompanyIdAndJieDuan(1, company.getId(), jieDuan);
            Map<String, List<InnerTabulation>> fenLeiInList = innerTabulationList.stream().collect(Collectors.groupingBy(InnerTabulation::getFenXiFenLei));
            sort++;
            for (Map.Entry<String, List<InnerTabulation>> item : fenLeiInList.entrySet()) {
//                Integer fenLei = item.getKey();
                String fenXiFenLei = item.getKey();
                List<InnerTabulation> value = item.getValue();
                VerticalStatisVo gsVo = new VerticalStatisVo();
                BigDecimal gongChengLiang = BigDecimal.ZERO;
                BigDecimal totalPrice = BigDecimal.ZERO;
                BigDecimal chaYiLv = BigDecimal.ZERO;
                BigDecimal chaYiE = BigDecimal.ZERO;
                String unit = value.get(0).getUnit();
                //1.调试、手续费、其他的工程量在这里分析都是固定为1
                //2.综合合价(表格中原始值)那里为0或为空，则工程量在这里是不统计的，对比时的综合单价和合计以表格中的原始值进行计算
                //3.unit单位按对应模板表设置
                if ("调试".equals(fenXiFenLei) || "手续费".equals(fenXiFenLei) || "其他".equals(fenXiFenLei)) {
                    unit = "项";
                    gongChengLiang = BigDecimal.ONE;
                    for (InnerTabulation tabulation : value) {
                        if (tabulation.getTotalPriceOriginal() != null && tabulation.getTotalPriceOriginal().compareTo(BigDecimal.ZERO) != 0) {
                            totalPrice = totalPrice.add(tabulation.getTotalPriceOriginal());
                        }
                    }
                } else {
                    for (InnerTabulation tabulation : value) {
                        if (tabulation.getTotalPriceOriginal() != null && tabulation.getTotalPriceOriginal().compareTo(BigDecimal.ZERO) != 0) {
                            // 返回的是double类型，需要转换成BigDecimal
                            gongChengLiang = gongChengLiang.add(BigDecimal.valueOf(tabulation.getGongChengLiang()).setScale(2, RoundingMode.HALF_UP));
                            totalPrice = totalPrice.add(tabulation.getTotalPriceOriginal());
                        }
                    }
                }
                if ("高压柜".equals(fenXiFenLei) || "低压柜".equals(fenXiFenLei) || "变压器".equals(fenXiFenLei)) {
                    unit = "台";
                }
                if ("母线槽".equals(fenXiFenLei) || "高压电缆".equals(fenXiFenLei) || "低压电缆".equals(fenXiFenLei)) {
                    unit = "m";
                }
                if ("电表箱".equals(fenXiFenLei) || "配电箱".equals(fenXiFenLei)) {
                    unit = "套";
                }
                if ("电表".equals(fenXiFenLei)) {
                    unit = "个";
                }
                gsVo.setSort(sort);
                gsVo.setBiddingName(value.get(0).getBiddingCompany().getSupplyCompany().getName());
//                gsVo.setFenLeiName(getFenLeiName(fenLei));
                gsVo.setFenXiFenLei(fenXiFenLei);
                gsVo.setUnit(unit);
                gsVo.setGongChengLiang(gongChengLiang);
                gsVo.setTotalPriceCalculate(totalPrice);
                if (gongChengLiang != null && gongChengLiang.compareTo(BigDecimal.ZERO) != 0) {
                    gsVo.setComprehensivePriceCalculate(totalPrice.divide(new BigDecimal(gongChengLiang.toString()), RoundingMode.HALF_UP));
                }
                if (jieDuan == 3 || jieDuan == 4 || jieDuan == 5) {
                    VerticalStatisVo previousGsVo = getPreviousData(company, jieDuan, fenXiFenLei);
                    if (previousGsVo != null) {
                        chaYiE = totalPrice.subtract(previousGsVo.getTotalPriceCalculate());
                        if (previousGsVo.getTotalPriceCalculate().longValue() != 0) {
                            chaYiLv = totalPrice.subtract(previousGsVo.getTotalPriceCalculate()).divide(previousGsVo.getTotalPriceCalculate(), RoundingMode.HALF_UP);
                        }
                        gsVo.setChaYiE(chaYiE);
                        gsVo.setChaYiLv(chaYiLv);
                    }
                }
                gsVoList.add(gsVo);
            }
        }

        //计算 与标底差异率
        List<VerticalStatisVo> valueBdList = new ArrayList<>();
        Map<String, List<VerticalStatisVo>> gsVoMap = gsVoList.stream().collect(Collectors.groupingBy(VerticalStatisVo::getBiddingName));
        for (Map.Entry<String, List<VerticalStatisVo>> item : gsVoMap.entrySet()) {
            String name = item.getKey();
            List<VerticalStatisVo> value = item.getValue();
            for (VerticalStatisVo gsVo : value) {
                BigDecimal biaoDi = BigDecimal.ZERO;
                for (VerticalStatisVo bdVo : bdVoList) {
                    if (bdVo.getFenXiFenLei().equals(gsVo.getFenXiFenLei())) {
                        //与标底差异率
                        if (gsVo.getComprehensivePriceCalculate() != null && bdVo.getComprehensivePriceCalculate() != null && bdVo.getComprehensivePriceCalculate().compareTo(BigDecimal.ZERO) != 0) {
                            biaoDi = gsVo.getComprehensivePriceCalculate().subtract(bdVo.getComprehensivePriceCalculate()).divide(bdVo.getComprehensivePriceCalculate(), RoundingMode.HALF_UP);
                        }
                    }
                }
                gsVo.setBiaoDi(biaoDi);
                valueBdList.add(gsVo);
            }
        }

        //计算 与投标最低价差异率
        List<VerticalStatisVo> valueTbList = new ArrayList<>();
        Map<String, List<VerticalStatisVo>> gstbVoMap = valueBdList.stream().collect(Collectors.groupingBy(VerticalStatisVo::getFenXiFenLei));
        for (Map.Entry<String, List<VerticalStatisVo>> item : gstbVoMap.entrySet()) {
            String name = item.getKey();
            List<VerticalStatisVo> value = item.getValue();

            BigDecimal comprehensivePrice = BigDecimal.valueOf(Long.MAX_VALUE);
            for (VerticalStatisVo vo : value) {
                if (vo.getComprehensivePriceCalculate() != null) {
                    BigDecimal tempComprehensivePrice = vo.getComprehensivePriceCalculate();
                    // 检查当前vo的comprehensivePrice是否小于当前记录的最小值
                    if (tempComprehensivePrice.compareTo(comprehensivePrice) < 0) {
                        comprehensivePrice = tempComprehensivePrice;
                    }
                }
            }

            for (VerticalStatisVo vo : value) {
                if (vo.getComprehensivePriceCalculate() != null && comprehensivePrice != null && comprehensivePrice.compareTo(BigDecimal.ZERO) != 0) {
                    vo.setTouBiao(vo.getComprehensivePriceCalculate().subtract(comprehensivePrice).divide(comprehensivePrice, RoundingMode.HALF_UP));
                }
                valueTbList.add(vo);
            }
        }

        //数据合并
        valueTbList.addAll(0, bdVoList);
        List<VerticalStatisVo> sortedList = valueTbList.stream().sorted(Comparator.comparingInt(VerticalStatisVo::getSort)
                .thenComparing(VerticalStatisVo::getFenXiFenLei)).collect(Collectors.toList());
        //数据格式转换
        List<VerticalStatisCollectVo> collectVoList = new ArrayList<>();
        Map<String, List<VerticalStatisVo>> tempMap = sortedList.stream().collect(Collectors.groupingBy(VerticalStatisVo::getFenXiFenLei));
        for (Map.Entry<String, List<VerticalStatisVo>> item : tempMap.entrySet()) {
            String name = item.getKey();
            List<VerticalStatisVo> value = item.getValue();
            String keyHashName = null;
            VerticalStatisCollectVo collectVo = new VerticalStatisCollectVo();
            for (VerticalStatisVo statisVo : value) {
                //类型+项目id+项目名+供应商名+分析分类名+sort(下面判断中的1~21-1)
                keyHashName = "1" + "-" + project.getId() + "-" + project.getName() + "-" + (statisVo.getBiddingName() != null ? statisVo.getBiddingName() : 0) + "-" + name + "-" + (statisVo.getSort() - 1) + "-" + jieDuan;
                if (statisVo.getSort() == 1) {
                    collectVo.setBiddingName("标底");
                    collectVo.setFenXiFenLei(statisVo.getFenXiFenLei());
                    collectVo.setUnit(statisVo.getUnit());
                    collectVo.setGongChengLiang(statisVo.getGongChengLiang());
                    collectVo.setTotalPriceCalculate(statisVo.getTotalPriceCalculate());
                    collectVo.setComprehensivePriceCalculate(statisVo.getComprehensivePriceCalculate());
                }
                if (statisVo.getSort() == 2) {
                    collectVo.setBiddingName1(statisVo.getBiddingName());
                    collectVo.setGongChengLiang1(statisVo.getGongChengLiang());
                    collectVo.setTotalPriceCalculate1(statisVo.getTotalPriceCalculate());
                    collectVo.setComprehensivePriceCalculate1(statisVo.getComprehensivePriceCalculate());
                    collectVo.setBiaoDi1(statisVo.getBiaoDi());
                    collectVo.setTouBiao1(statisVo.getTouBiao());
                    collectVo.setChaYiE1(statisVo.getChaYiE());
                    collectVo.setChaYiLv1(statisVo.getChaYiLv());
                    collectVo.setKeyHash1(comparativeAnalysisRemarkService.generateKeyHash(keyHashName));
                    collectVo.setChaYiRemark1(comparativeAnalysisRemarkService.getRemark(1, comparativeAnalysisRemarkService.generateKeyHash(keyHashName), keyHashName));
                }
                if (statisVo.getSort() == 3) {
                    collectVo.setBiddingName2(statisVo.getBiddingName());
                    collectVo.setGongChengLiang2(statisVo.getGongChengLiang());
                    collectVo.setTotalPriceCalculate2(statisVo.getTotalPriceCalculate());
                    collectVo.setComprehensivePriceCalculate2(statisVo.getComprehensivePriceCalculate());
                    collectVo.setBiaoDi2(statisVo.getBiaoDi());
                    collectVo.setTouBiao2(statisVo.getTouBiao());
                    collectVo.setChaYiE2(statisVo.getChaYiE());
                    collectVo.setChaYiLv2(statisVo.getChaYiLv());
                    collectVo.setKeyHash2(comparativeAnalysisRemarkService.generateKeyHash(keyHashName));
                    collectVo.setChaYiRemark2(comparativeAnalysisRemarkService.getRemark(1, comparativeAnalysisRemarkService.generateKeyHash(keyHashName), keyHashName));
                }
                if (statisVo.getSort() == 4) {
                    collectVo.setBiddingName3(statisVo.getBiddingName());
                    collectVo.setGongChengLiang3(statisVo.getGongChengLiang());
                    collectVo.setTotalPriceCalculate3(statisVo.getTotalPriceCalculate());
                    collectVo.setComprehensivePriceCalculate3(statisVo.getComprehensivePriceCalculate());
                    collectVo.setBiaoDi3(statisVo.getBiaoDi());
                    collectVo.setTouBiao3(statisVo.getTouBiao());
                    collectVo.setChaYiE3(statisVo.getChaYiE());
                    collectVo.setChaYiLv3(statisVo.getChaYiLv());
                    collectVo.setKeyHash3(comparativeAnalysisRemarkService.generateKeyHash(keyHashName));
                    collectVo.setChaYiRemark3(comparativeAnalysisRemarkService.getRemark(1, comparativeAnalysisRemarkService.generateKeyHash(keyHashName), keyHashName));
                }
                if (statisVo.getSort() == 5) {
                    collectVo.setBiddingName4(statisVo.getBiddingName());
                    collectVo.setGongChengLiang4(statisVo.getGongChengLiang());
                    collectVo.setTotalPriceCalculate4(statisVo.getTotalPriceCalculate());
                    collectVo.setComprehensivePriceCalculate4(statisVo.getComprehensivePriceCalculate());
                    collectVo.setBiaoDi4(statisVo.getBiaoDi());
                    collectVo.setTouBiao4(statisVo.getTouBiao());
                    collectVo.setChaYiE4(statisVo.getChaYiE());
                    collectVo.setChaYiLv4(statisVo.getChaYiLv());
                    collectVo.setKeyHash4(comparativeAnalysisRemarkService.generateKeyHash(keyHashName));
                    collectVo.setChaYiRemark4(comparativeAnalysisRemarkService.getRemark(1, comparativeAnalysisRemarkService.generateKeyHash(keyHashName), keyHashName));
                }
                if (statisVo.getSort() == 6) {
                    collectVo.setBiddingName5(statisVo.getBiddingName());
                    collectVo.setGongChengLiang5(statisVo.getGongChengLiang());
                    collectVo.setTotalPriceCalculate5(statisVo.getTotalPriceCalculate());
                    collectVo.setComprehensivePriceCalculate5(statisVo.getComprehensivePriceCalculate());
                    collectVo.setBiaoDi5(statisVo.getBiaoDi());
                    collectVo.setTouBiao5(statisVo.getTouBiao());
                    collectVo.setChaYiE5(statisVo.getChaYiE());
                    collectVo.setChaYiLv5(statisVo.getChaYiLv());
                    collectVo.setKeyHash5(comparativeAnalysisRemarkService.generateKeyHash(keyHashName));
                    collectVo.setChaYiRemark5(comparativeAnalysisRemarkService.getRemark(1, comparativeAnalysisRemarkService.generateKeyHash(keyHashName), keyHashName));
                }
                if (statisVo.getSort() == 7) {
                    collectVo.setBiddingName6(statisVo.getBiddingName());
                    collectVo.setGongChengLiang6(statisVo.getGongChengLiang());
                    collectVo.setTotalPriceCalculate6(statisVo.getTotalPriceCalculate());
                    collectVo.setComprehensivePriceCalculate6(statisVo.getComprehensivePriceCalculate());
                    collectVo.setBiaoDi6(statisVo.getBiaoDi());
                    collectVo.setTouBiao6(statisVo.getTouBiao());
                    collectVo.setChaYiE6(statisVo.getChaYiE());
                    collectVo.setChaYiLv6(statisVo.getChaYiLv());
                    collectVo.setKeyHash6(comparativeAnalysisRemarkService.generateKeyHash(keyHashName));
                    collectVo.setChaYiRemark6(comparativeAnalysisRemarkService.getRemark(1, comparativeAnalysisRemarkService.generateKeyHash(keyHashName), keyHashName));
                }
                if (statisVo.getSort() == 8) {
                    collectVo.setBiddingName7(statisVo.getBiddingName());
                    collectVo.setGongChengLiang7(statisVo.getGongChengLiang());
                    collectVo.setTotalPriceCalculate7(statisVo.getTotalPriceCalculate());
                    collectVo.setComprehensivePriceCalculate7(statisVo.getComprehensivePriceCalculate());
                    collectVo.setBiaoDi7(statisVo.getBiaoDi());
                    collectVo.setTouBiao7(statisVo.getTouBiao());
                    collectVo.setChaYiE7(statisVo.getChaYiE());
                    collectVo.setChaYiLv7(statisVo.getChaYiLv());
                    collectVo.setKeyHash7(comparativeAnalysisRemarkService.generateKeyHash(keyHashName));
                    collectVo.setChaYiRemark7(comparativeAnalysisRemarkService.getRemark(1, comparativeAnalysisRemarkService.generateKeyHash(keyHashName), keyHashName));
                }
                if (statisVo.getSort() == 9) {
                    collectVo.setBiddingName8(statisVo.getBiddingName());
                    collectVo.setGongChengLiang8(statisVo.getGongChengLiang());
                    collectVo.setTotalPriceCalculate8(statisVo.getTotalPriceCalculate());
                    collectVo.setComprehensivePriceCalculate8(statisVo.getComprehensivePriceCalculate());
                    collectVo.setBiaoDi8(statisVo.getBiaoDi());
                    collectVo.setTouBiao8(statisVo.getTouBiao());
                    collectVo.setChaYiE8(statisVo.getChaYiE());
                    collectVo.setChaYiLv8(statisVo.getChaYiLv());
                    collectVo.setKeyHash8(comparativeAnalysisRemarkService.generateKeyHash(keyHashName));
                    collectVo.setChaYiRemark8(comparativeAnalysisRemarkService.getRemark(1, comparativeAnalysisRemarkService.generateKeyHash(keyHashName), keyHashName));
                }
                if (statisVo.getSort() == 10) {
                    collectVo.setBiddingName9(statisVo.getBiddingName());
                    collectVo.setGongChengLiang9(statisVo.getGongChengLiang());
                    collectVo.setTotalPriceCalculate9(statisVo.getTotalPriceCalculate());
                    collectVo.setComprehensivePriceCalculate9(statisVo.getComprehensivePriceCalculate());
                    collectVo.setBiaoDi9(statisVo.getBiaoDi());
                    collectVo.setTouBiao9(statisVo.getTouBiao());
                    collectVo.setChaYiE9(statisVo.getChaYiE());
                    collectVo.setChaYiLv9(statisVo.getChaYiLv());
                    collectVo.setKeyHash9(comparativeAnalysisRemarkService.generateKeyHash(keyHashName));
                    collectVo.setChaYiRemark9(comparativeAnalysisRemarkService.getRemark(1, comparativeAnalysisRemarkService.generateKeyHash(keyHashName), keyHashName));
                }
                if (statisVo.getSort() == 11) {
                    collectVo.setBiddingName10(statisVo.getBiddingName());
                    collectVo.setGongChengLiang10(statisVo.getGongChengLiang());
                    collectVo.setTotalPriceCalculate10(statisVo.getTotalPriceCalculate());
                    collectVo.setComprehensivePriceCalculate10(statisVo.getComprehensivePriceCalculate());
                    collectVo.setBiaoDi10(statisVo.getBiaoDi());
                    collectVo.setTouBiao10(statisVo.getTouBiao());
                    collectVo.setChaYiE10(statisVo.getChaYiE());
                    collectVo.setChaYiLv10(statisVo.getChaYiLv());
                    collectVo.setKeyHash10(comparativeAnalysisRemarkService.generateKeyHash(keyHashName));
                    collectVo.setChaYiRemark10(comparativeAnalysisRemarkService.getRemark(1, comparativeAnalysisRemarkService.generateKeyHash(keyHashName), keyHashName));
                }
                if (statisVo.getSort() == 12) {
                    collectVo.setBiddingName11(statisVo.getBiddingName());
                    collectVo.setGongChengLiang11(statisVo.getGongChengLiang());
                    collectVo.setTotalPriceCalculate11(statisVo.getTotalPriceCalculate());
                    collectVo.setComprehensivePriceCalculate11(statisVo.getComprehensivePriceCalculate());
                    collectVo.setBiaoDi11(statisVo.getBiaoDi());
                    collectVo.setTouBiao11(statisVo.getTouBiao());
                    collectVo.setChaYiE11(statisVo.getChaYiE());
                    collectVo.setChaYiLv11(statisVo.getChaYiLv());
                    collectVo.setKeyHash11(comparativeAnalysisRemarkService.generateKeyHash(keyHashName));
                    collectVo.setChaYiRemark11(comparativeAnalysisRemarkService.getRemark(1, comparativeAnalysisRemarkService.generateKeyHash(keyHashName), keyHashName));
                }
                if (statisVo.getSort() == 13) {
                    collectVo.setBiddingName12(statisVo.getBiddingName());
                    collectVo.setGongChengLiang12(statisVo.getGongChengLiang());
                    collectVo.setTotalPriceCalculate12(statisVo.getTotalPriceCalculate());
                    collectVo.setComprehensivePriceCalculate12(statisVo.getComprehensivePriceCalculate());
                    collectVo.setBiaoDi12(statisVo.getBiaoDi());
                    collectVo.setTouBiao12(statisVo.getTouBiao());
                    collectVo.setChaYiE12(statisVo.getChaYiE());
                    collectVo.setChaYiLv12(statisVo.getChaYiLv());
                    collectVo.setKeyHash12(comparativeAnalysisRemarkService.generateKeyHash(keyHashName));
                    collectVo.setChaYiRemark12(comparativeAnalysisRemarkService.getRemark(1, comparativeAnalysisRemarkService.generateKeyHash(keyHashName), keyHashName));
                }
                if (statisVo.getSort() == 14) {
                    collectVo.setBiddingName13(statisVo.getBiddingName());
                    collectVo.setGongChengLiang13(statisVo.getGongChengLiang());
                    collectVo.setTotalPriceCalculate13(statisVo.getTotalPriceCalculate());
                    collectVo.setComprehensivePriceCalculate13(statisVo.getComprehensivePriceCalculate());
                    collectVo.setBiaoDi13(statisVo.getBiaoDi());
                    collectVo.setTouBiao13(statisVo.getTouBiao());
                    collectVo.setChaYiE13(statisVo.getChaYiE());
                    collectVo.setChaYiLv13(statisVo.getChaYiLv());
                    collectVo.setKeyHash13(comparativeAnalysisRemarkService.generateKeyHash(keyHashName));
                    collectVo.setChaYiRemark13(comparativeAnalysisRemarkService.getRemark(1, comparativeAnalysisRemarkService.generateKeyHash(keyHashName), keyHashName));
                }
                if (statisVo.getSort() == 15) {
                    collectVo.setBiddingName14(statisVo.getBiddingName());
                    collectVo.setGongChengLiang14(statisVo.getGongChengLiang());
                    collectVo.setTotalPriceCalculate14(statisVo.getTotalPriceCalculate());
                    collectVo.setComprehensivePriceCalculate14(statisVo.getComprehensivePriceCalculate());
                    collectVo.setBiaoDi14(statisVo.getBiaoDi());
                    collectVo.setTouBiao14(statisVo.getTouBiao());
                    collectVo.setChaYiE14(statisVo.getChaYiE());
                    collectVo.setChaYiLv14(statisVo.getChaYiLv());
                    collectVo.setKeyHash14(comparativeAnalysisRemarkService.generateKeyHash(keyHashName));
                    collectVo.setChaYiRemark14(comparativeAnalysisRemarkService.getRemark(1, comparativeAnalysisRemarkService.generateKeyHash(keyHashName), keyHashName));
                }
                if (statisVo.getSort() == 16) {
                    collectVo.setBiddingName15(statisVo.getBiddingName());
                    collectVo.setGongChengLiang15(statisVo.getGongChengLiang());
                    collectVo.setTotalPriceCalculate15(statisVo.getTotalPriceCalculate());
                    collectVo.setComprehensivePriceCalculate15(statisVo.getComprehensivePriceCalculate());
                    collectVo.setBiaoDi15(statisVo.getBiaoDi());
                    collectVo.setTouBiao15(statisVo.getTouBiao());
                    collectVo.setChaYiE15(statisVo.getChaYiE());
                    collectVo.setChaYiLv15(statisVo.getChaYiLv());
                    collectVo.setKeyHash15(comparativeAnalysisRemarkService.generateKeyHash(keyHashName));
                    collectVo.setChaYiRemark15(comparativeAnalysisRemarkService.getRemark(1, comparativeAnalysisRemarkService.generateKeyHash(keyHashName), keyHashName));
                }
                if (statisVo.getSort() == 17) {
                    collectVo.setBiddingName16(statisVo.getBiddingName());
                    collectVo.setGongChengLiang16(statisVo.getGongChengLiang());
                    collectVo.setTotalPriceCalculate16(statisVo.getTotalPriceCalculate());
                    collectVo.setComprehensivePriceCalculate16(statisVo.getComprehensivePriceCalculate());
                    collectVo.setBiaoDi16(statisVo.getBiaoDi());
                    collectVo.setTouBiao16(statisVo.getTouBiao());
                    collectVo.setChaYiE16(statisVo.getChaYiE());
                    collectVo.setChaYiLv16(statisVo.getChaYiLv());
                    collectVo.setKeyHash16(comparativeAnalysisRemarkService.generateKeyHash(keyHashName));
                    collectVo.setChaYiRemark16(comparativeAnalysisRemarkService.getRemark(1, comparativeAnalysisRemarkService.generateKeyHash(keyHashName), keyHashName));
                }
                if (statisVo.getSort() == 18) {
                    collectVo.setBiddingName17(statisVo.getBiddingName());
                    collectVo.setGongChengLiang17(statisVo.getGongChengLiang());
                    collectVo.setTotalPriceCalculate17(statisVo.getTotalPriceCalculate());
                    collectVo.setComprehensivePriceCalculate17(statisVo.getComprehensivePriceCalculate());
                    collectVo.setBiaoDi17(statisVo.getBiaoDi());
                    collectVo.setTouBiao17(statisVo.getTouBiao());
                    collectVo.setChaYiE17(statisVo.getChaYiE());
                    collectVo.setChaYiLv17(statisVo.getChaYiLv());
                    collectVo.setKeyHash17(comparativeAnalysisRemarkService.generateKeyHash(keyHashName));
                    collectVo.setChaYiRemark17(comparativeAnalysisRemarkService.getRemark(1, comparativeAnalysisRemarkService.generateKeyHash(keyHashName), keyHashName));
                }
                if (statisVo.getSort() == 19) {
                    collectVo.setBiddingName18(statisVo.getBiddingName());
                    collectVo.setGongChengLiang18(statisVo.getGongChengLiang());
                    collectVo.setTotalPriceCalculate18(statisVo.getTotalPriceCalculate());
                    collectVo.setComprehensivePriceCalculate18(statisVo.getComprehensivePriceCalculate());
                    collectVo.setBiaoDi18(statisVo.getBiaoDi());
                    collectVo.setTouBiao18(statisVo.getTouBiao());
                    collectVo.setChaYiE18(statisVo.getChaYiE());
                    collectVo.setChaYiLv18(statisVo.getChaYiLv());
                    collectVo.setKeyHash18(comparativeAnalysisRemarkService.generateKeyHash(keyHashName));
                    collectVo.setChaYiRemark18(comparativeAnalysisRemarkService.getRemark(1, comparativeAnalysisRemarkService.generateKeyHash(keyHashName), keyHashName));
                }
                if (statisVo.getSort() == 20) {
                    collectVo.setBiddingName19(statisVo.getBiddingName());
                    collectVo.setGongChengLiang19(statisVo.getGongChengLiang());
                    collectVo.setTotalPriceCalculate19(statisVo.getTotalPriceCalculate());
                    collectVo.setComprehensivePriceCalculate19(statisVo.getComprehensivePriceCalculate());
                    collectVo.setBiaoDi19(statisVo.getBiaoDi());
                    collectVo.setTouBiao19(statisVo.getTouBiao());
                    collectVo.setChaYiE19(statisVo.getChaYiE());
                    collectVo.setChaYiLv19(statisVo.getChaYiLv());
                    collectVo.setKeyHash19(comparativeAnalysisRemarkService.generateKeyHash(keyHashName));
                    collectVo.setChaYiRemark19(comparativeAnalysisRemarkService.getRemark(1, comparativeAnalysisRemarkService.generateKeyHash(keyHashName), keyHashName));
                }
                if (statisVo.getSort() == 21) {
                    collectVo.setBiddingName20(statisVo.getBiddingName());
                    collectVo.setGongChengLiang20(statisVo.getGongChengLiang());
                    collectVo.setTotalPriceCalculate20(statisVo.getTotalPriceCalculate());
                    collectVo.setComprehensivePriceCalculate20(statisVo.getComprehensivePriceCalculate());
                    collectVo.setBiaoDi20(statisVo.getBiaoDi());
                    collectVo.setTouBiao20(statisVo.getTouBiao());
                    collectVo.setChaYiE20(statisVo.getChaYiE());
                    collectVo.setChaYiLv20(statisVo.getChaYiLv());
                    collectVo.setKeyHash20(comparativeAnalysisRemarkService.generateKeyHash(keyHashName));
                    collectVo.setChaYiRemark20(comparativeAnalysisRemarkService.getRemark(1, comparativeAnalysisRemarkService.generateKeyHash(keyHashName), keyHashName));
                }
            }
            collectVoList.add(collectVo);
        }
        //排序并返回
        return fenXiFenLeiSort(collectVoList);
    }

    /**
     * 投标报价纵向对比按指定顺序排序
     *
     * @param collectVoList
     * @return
     */
    public List<VerticalStatisCollectVo> fenXiFenLeiSort(List<VerticalStatisCollectVo> collectVoList) {
        if (collectVoList == null) {
            return null;
        }
        for (VerticalStatisCollectVo vo : collectVoList) {
            if (vo.getFenXiFenLei() != null) {
                switch (vo.getFenXiFenLei()) {
                    case "变压器":
                        vo.setSort(3);
                        break;
                    case "低压柜":
                        vo.setSort(2);
                        break;
                    case "调试":
                        vo.setSort(10);
                        break;
                    case "高压电缆":
                        vo.setSort(7);
                        break;
                    case "高压柜":
                        vo.setSort(1);
                        break;
                    case "电表":
                        vo.setSort(5);
                        break;
                    case "电表箱":
                        vo.setSort(4);
                        break;
                    case "母线槽":
                        vo.setSort(6);
                        break;
                    case "低压电缆":
                        vo.setSort(8);
                        break;
                    case "配电箱":
                        vo.setSort(9);
                        break;
                    case "其他":
                        vo.setSort(12);
                        break;
                    case "手续费":
                        vo.setSort(11);
                        break;
                    default:
                        // 给未匹配的分类一个默认的最大值
                        vo.setSort(Integer.MAX_VALUE);
                        break;
                }
            } else {
                vo.setSort(Integer.MAX_VALUE);
            }
        }
        // 过滤掉sort为null的元素
        return collectVoList.stream().filter(vo -> vo.getSort() != null)
                .sorted(Comparator.comparingInt(VerticalStatisCollectVo::getSort)).collect(Collectors.toList());
    }


    /**
     * 获得当前公司上一阶段的内线数据
     *
     * @param company     绑定公司
     * @param jieDuan     当前阶段
     * @param fenXiFenLei 当前比对的分析类型
     * @return
     */
    public VerticalStatisVo getPreviousData(BiddingCompany company, Integer jieDuan, String fenXiFenLei) {
        List<InnerTabulation> innerTabulationList = new ArrayList<>();
        //查询公司上一阶段的内线数据
        if (jieDuan == 3) {
            innerTabulationList = innerTabulationService.getRepository().findByFlagAndBiddingCompanyIdAndJieDuan(1, company.getId(), 2);
        }
        if (jieDuan == 4) {
            innerTabulationList = innerTabulationService.getRepository().findByFlagAndBiddingCompanyIdAndJieDuan(1, company.getId(), 3);
        }
        if (jieDuan == 5) {
            innerTabulationList = innerTabulationService.getRepository().findByFlagAndBiddingCompanyIdAndJieDuan(1, company.getId(), 4);
        }
        if (innerTabulationList.size() == 0) {
            return null;
        }
        VerticalStatisVo previousGsVo = new VerticalStatisVo();
        BigDecimal gongChengLiang = BigDecimal.ZERO;
        BigDecimal totalPrice = BigDecimal.ZERO;

        //计算上个阶段对应当前分析分类的相关数据
        if ("调试".equals(fenXiFenLei) || "手续费".equals(fenXiFenLei) || "其他".equals(fenXiFenLei)) {
            gongChengLiang = BigDecimal.ONE;
            for (InnerTabulation tabulation : innerTabulationList) {
                if (fenXiFenLei.equals(tabulation.getFenXiFenLei()) && tabulation.getTotalPriceOriginal() != null && tabulation.getTotalPriceOriginal().compareTo(BigDecimal.ZERO) != 0) {
                    totalPrice = totalPrice.add(tabulation.getTotalPriceOriginal());
                }
            }
        } else {
            for (InnerTabulation tabulation : innerTabulationList) {
                if (fenXiFenLei.equals(tabulation.getFenXiFenLei()) && tabulation.getTotalPriceOriginal() != null && tabulation.getTotalPriceOriginal().compareTo(BigDecimal.ZERO) != 0) {
                    gongChengLiang = gongChengLiang.add(BigDecimal.valueOf(tabulation.getGongChengLiang()).setScale(2, RoundingMode.HALF_UP));
                    totalPrice = totalPrice.add(tabulation.getTotalPriceOriginal());
                }
            }
        }
//        for (InnerTabulation tabulation : innerTabulationList) {
//            if (fenXiFenLei.equals(tabulation.getFenXiFenLei())) {
//                gongChengLiang = gongChengLiang.add(BigDecimal.valueOf(tabulation.getGongChengLiang()).setScale(2, RoundingMode.HALF_UP));
//                totalPrice = totalPrice.add(tabulation.getTotalPriceOriginal());
//            }
//        }

        previousGsVo.setBiddingName(company.getSupplyCompany().getName());
        previousGsVo.setFenXiFenLei(fenXiFenLei);
        previousGsVo.setGongChengLiang(gongChengLiang);
        previousGsVo.setTotalPriceCalculate(totalPrice);
        if (gongChengLiang != null && gongChengLiang.compareTo(BigDecimal.ZERO) != 0) {
            previousGsVo.setComprehensivePriceCalculate(totalPrice.divide(new BigDecimal(gongChengLiang.toString()), RoundingMode.HALF_UP));
        }
        return previousGsVo;
    }


    /**
     * 纵向对比、计算差异率(单个供应商)
     *
     * @param toList
     * @param supplyCompany
     * @return
     */
    public List<VerticalStatisCollectVo> getVerticalStatisOne(List<VerticalStatisCollectVo> toList, SupplyCompany supplyCompany, List<BiddingCompany> companyItemList, Integer jieDuan) {
        if (companyItemList.size() >= 1) {
            List<InnerTabulation> tabulationList = innerTabulationService.getRepository().findByFlagAndBiddingCompanyIdAndJieDuan(1, companyItemList.get(0).getId(), jieDuan);
            if (tabulationList.size() == 0) {
                for (VerticalStatisCollectVo vo : toList) {
                    vo.setBiddingName1(null);
                    vo.setBiddingName2(null);
                    vo.setBiddingName3(null);
                    vo.setBiddingName4(null);
                    vo.setBiddingName5(null);
                    vo.setBiddingName6(null);
                    vo.setBiddingName7(null);
                    vo.setBiddingName8(null);
                    vo.setBiddingName9(null);
                    vo.setBiddingName10(null);
                    vo.setBiddingName11(null);
                    vo.setBiddingName12(null);
                    vo.setBiddingName13(null);
                    vo.setBiddingName14(null);
                    vo.setBiddingName15(null);
                    vo.setBiddingName16(null);
                    vo.setBiddingName17(null);
                    vo.setBiddingName18(null);
                    vo.setBiddingName19(null);
                    vo.setBiddingName20(null);
                }
                return toList;
            }
        }
        for (VerticalStatisCollectVo vo : toList) {
            if (supplyCompany.getName().equals(vo.getBiddingName1())) {
//                    vo.setBiddingNameC1(null);
                vo.setBiddingName2(null);
                vo.setBiddingName3(null);
                vo.setBiddingName4(null);
                vo.setBiddingName5(null);
                vo.setBiddingName6(null);
                vo.setBiddingName7(null);
                vo.setBiddingName8(null);
                vo.setBiddingName9(null);
                vo.setBiddingName10(null);
                vo.setBiddingName11(null);
                vo.setBiddingName12(null);
                vo.setBiddingName13(null);
                vo.setBiddingName14(null);
                vo.setBiddingName15(null);
                vo.setBiddingName16(null);
                vo.setBiddingName17(null);
                vo.setBiddingName18(null);
                vo.setBiddingName19(null);
                vo.setBiddingName20(null);
            }
            if (supplyCompany.getName().equals(vo.getBiddingName2())) {
                vo.setBiddingName1(null);
//                    vo.setBiddingNameC2(null);
                vo.setBiddingName3(null);
                vo.setBiddingName4(null);
                vo.setBiddingName5(null);
                vo.setBiddingName6(null);
                vo.setBiddingName7(null);
                vo.setBiddingName8(null);
                vo.setBiddingName9(null);
                vo.setBiddingName10(null);
                vo.setBiddingName11(null);
                vo.setBiddingName12(null);
                vo.setBiddingName13(null);
                vo.setBiddingName14(null);
                vo.setBiddingName15(null);
                vo.setBiddingName16(null);
                vo.setBiddingName17(null);
                vo.setBiddingName18(null);
                vo.setBiddingName19(null);
                vo.setBiddingName20(null);
            }
            if (supplyCompany.getName().equals(vo.getBiddingName3())) {
                vo.setBiddingName1(null);
                vo.setBiddingName2(null);
//                    vo.setBiddingNameC3(null);
                vo.setBiddingName4(null);
                vo.setBiddingName5(null);
                vo.setBiddingName6(null);
                vo.setBiddingName7(null);
                vo.setBiddingName8(null);
                vo.setBiddingName9(null);
                vo.setBiddingName10(null);
                vo.setBiddingName11(null);
                vo.setBiddingName12(null);
                vo.setBiddingName13(null);
                vo.setBiddingName14(null);
                vo.setBiddingName15(null);
                vo.setBiddingName16(null);
                vo.setBiddingName17(null);
                vo.setBiddingName18(null);
                vo.setBiddingName19(null);
                vo.setBiddingName20(null);
            }
            if (supplyCompany.getName().equals(vo.getBiddingName4())) {
                vo.setBiddingName1(null);
                vo.setBiddingName2(null);
                vo.setBiddingName3(null);
//                    vo.setBiddingNameC4(null);
                vo.setBiddingName5(null);
                vo.setBiddingName6(null);
                vo.setBiddingName7(null);
                vo.setBiddingName8(null);
                vo.setBiddingName9(null);
                vo.setBiddingName10(null);
                vo.setBiddingName11(null);
                vo.setBiddingName12(null);
                vo.setBiddingName13(null);
                vo.setBiddingName14(null);
                vo.setBiddingName15(null);
                vo.setBiddingName16(null);
                vo.setBiddingName17(null);
                vo.setBiddingName18(null);
                vo.setBiddingName19(null);
                vo.setBiddingName20(null);
            }
            if (supplyCompany.getName().equals(vo.getBiddingName5())) {
                vo.setBiddingName1(null);
                vo.setBiddingName2(null);
                vo.setBiddingName3(null);
                vo.setBiddingName4(null);
//                    vo.setBiddingNameC5(null);
                vo.setBiddingName6(null);
                vo.setBiddingName7(null);
                vo.setBiddingName8(null);
                vo.setBiddingName9(null);
                vo.setBiddingName10(null);
                vo.setBiddingName11(null);
                vo.setBiddingName12(null);
                vo.setBiddingName13(null);
                vo.setBiddingName14(null);
                vo.setBiddingName15(null);
                vo.setBiddingName16(null);
                vo.setBiddingName17(null);
                vo.setBiddingName18(null);
                vo.setBiddingName19(null);
                vo.setBiddingName20(null);
            }
            if (supplyCompany.getName().equals(vo.getBiddingName6())) {
                vo.setBiddingName1(null);
                vo.setBiddingName2(null);
                vo.setBiddingName3(null);
                vo.setBiddingName4(null);
                vo.setBiddingName5(null);
//                    vo.setBiddingNameC6(null);
                vo.setBiddingName7(null);
                vo.setBiddingName8(null);
                vo.setBiddingName9(null);
                vo.setBiddingName10(null);
                vo.setBiddingName11(null);
                vo.setBiddingName12(null);
                vo.setBiddingName13(null);
                vo.setBiddingName14(null);
                vo.setBiddingName15(null);
                vo.setBiddingName16(null);
                vo.setBiddingName17(null);
                vo.setBiddingName18(null);
                vo.setBiddingName19(null);
                vo.setBiddingName20(null);
            }
            if (supplyCompany.getName().equals(vo.getBiddingName7())) {
                vo.setBiddingName1(null);
                vo.setBiddingName2(null);
                vo.setBiddingName3(null);
                vo.setBiddingName4(null);
                vo.setBiddingName5(null);
                vo.setBiddingName6(null);
//                    vo.setBiddingName7(null);
                vo.setBiddingName8(null);
                vo.setBiddingName9(null);
                vo.setBiddingName10(null);
                vo.setBiddingName11(null);
                vo.setBiddingName12(null);
                vo.setBiddingName13(null);
                vo.setBiddingName14(null);
                vo.setBiddingName15(null);
                vo.setBiddingName16(null);
                vo.setBiddingName17(null);
                vo.setBiddingName18(null);
                vo.setBiddingName19(null);
                vo.setBiddingName20(null);
            }
            if (supplyCompany.getName().equals(vo.getBiddingName8())) {
                vo.setBiddingName1(null);
                vo.setBiddingName2(null);
                vo.setBiddingName3(null);
                vo.setBiddingName4(null);
                vo.setBiddingName5(null);
                vo.setBiddingName6(null);
                vo.setBiddingName7(null);
//                    vo.setBiddingNameC8(null);
                vo.setBiddingName9(null);
                vo.setBiddingName10(null);
                vo.setBiddingName11(null);
                vo.setBiddingName12(null);
                vo.setBiddingName13(null);
                vo.setBiddingName14(null);
                vo.setBiddingName15(null);
                vo.setBiddingName16(null);
                vo.setBiddingName17(null);
                vo.setBiddingName18(null);
                vo.setBiddingName19(null);
                vo.setBiddingName20(null);
            }
            if (supplyCompany.getName().equals(vo.getBiddingName9())) {
                vo.setBiddingName1(null);
                vo.setBiddingName2(null);
                vo.setBiddingName3(null);
                vo.setBiddingName4(null);
                vo.setBiddingName5(null);
                vo.setBiddingName6(null);
                vo.setBiddingName7(null);
                vo.setBiddingName8(null);
//                    vo.setBiddingName9(null);
                vo.setBiddingName10(null);
                vo.setBiddingName11(null);
                vo.setBiddingName12(null);
                vo.setBiddingName13(null);
                vo.setBiddingName14(null);
                vo.setBiddingName15(null);
                vo.setBiddingName16(null);
                vo.setBiddingName17(null);
                vo.setBiddingName18(null);
                vo.setBiddingName19(null);
                vo.setBiddingName20(null);
            }
            if (supplyCompany.getName().equals(vo.getBiddingName10())) {
                vo.setBiddingName1(null);
                vo.setBiddingName2(null);
                vo.setBiddingName3(null);
                vo.setBiddingName4(null);
                vo.setBiddingName5(null);
                vo.setBiddingName6(null);
                vo.setBiddingName7(null);
                vo.setBiddingName8(null);
                vo.setBiddingName9(null);
//                    vo.setBiddingNameC10(null);
                vo.setBiddingName11(null);
                vo.setBiddingName12(null);
                vo.setBiddingName13(null);
                vo.setBiddingName14(null);
                vo.setBiddingName15(null);
                vo.setBiddingName16(null);
                vo.setBiddingName17(null);
                vo.setBiddingName18(null);
                vo.setBiddingName19(null);
                vo.setBiddingName20(null);
            }
            if (supplyCompany.getName().equals(vo.getBiddingName11())) {
                vo.setBiddingName1(null);
                vo.setBiddingName2(null);
                vo.setBiddingName3(null);
                vo.setBiddingName4(null);
                vo.setBiddingName5(null);
                vo.setBiddingName6(null);
                vo.setBiddingName7(null);
                vo.setBiddingName8(null);
                vo.setBiddingName9(null);
                vo.setBiddingName10(null);
//                    vo.setBiddingName11(null);
                vo.setBiddingName12(null);
                vo.setBiddingName13(null);
                vo.setBiddingName14(null);
                vo.setBiddingName15(null);
                vo.setBiddingName16(null);
                vo.setBiddingName17(null);
                vo.setBiddingName18(null);
                vo.setBiddingName19(null);
                vo.setBiddingName20(null);
            }
            if (supplyCompany.getName().equals(vo.getBiddingName12())) {
                vo.setBiddingName1(null);
                vo.setBiddingName2(null);
                vo.setBiddingName3(null);
                vo.setBiddingName4(null);
                vo.setBiddingName5(null);
                vo.setBiddingName6(null);
                vo.setBiddingName7(null);
                vo.setBiddingName8(null);
                vo.setBiddingName9(null);
                vo.setBiddingName10(null);
                vo.setBiddingName11(null);
//                    vo.setBiddingNameC12(null);
                vo.setBiddingName13(null);
                vo.setBiddingName14(null);
                vo.setBiddingName15(null);
                vo.setBiddingName16(null);
                vo.setBiddingName17(null);
                vo.setBiddingName18(null);
                vo.setBiddingName19(null);
                vo.setBiddingName20(null);
            }
            if (supplyCompany.getName().equals(vo.getBiddingName13())) {
                vo.setBiddingName1(null);
                vo.setBiddingName2(null);
                vo.setBiddingName3(null);
                vo.setBiddingName4(null);
                vo.setBiddingName5(null);
                vo.setBiddingName6(null);
                vo.setBiddingName7(null);
                vo.setBiddingName8(null);
                vo.setBiddingName9(null);
                vo.setBiddingName10(null);
                vo.setBiddingName11(null);
                vo.setBiddingName12(null);
//                    vo.setBiddingNameC13(null);
                vo.setBiddingName14(null);
                vo.setBiddingName15(null);
                vo.setBiddingName16(null);
                vo.setBiddingName17(null);
                vo.setBiddingName18(null);
                vo.setBiddingName19(null);
                vo.setBiddingName20(null);
            }
            if (supplyCompany.getName().equals(vo.getBiddingName14())) {
                vo.setBiddingName1(null);
                vo.setBiddingName2(null);
                vo.setBiddingName3(null);
                vo.setBiddingName4(null);
                vo.setBiddingName5(null);
                vo.setBiddingName6(null);
                vo.setBiddingName7(null);
                vo.setBiddingName8(null);
                vo.setBiddingName9(null);
                vo.setBiddingName10(null);
                vo.setBiddingName11(null);
                vo.setBiddingName12(null);
                vo.setBiddingName13(null);
//                    vo.setBiddingName14(null);
                vo.setBiddingName15(null);
                vo.setBiddingName16(null);
                vo.setBiddingName17(null);
                vo.setBiddingName18(null);
                vo.setBiddingName19(null);
                vo.setBiddingName20(null);
            }
            if (supplyCompany.getName().equals(vo.getBiddingName15())) {
                vo.setBiddingName1(null);
                vo.setBiddingName2(null);
                vo.setBiddingName3(null);
                vo.setBiddingName4(null);
                vo.setBiddingName5(null);
                vo.setBiddingName6(null);
                vo.setBiddingName7(null);
                vo.setBiddingName8(null);
                vo.setBiddingName9(null);
                vo.setBiddingName10(null);
                vo.setBiddingName11(null);
                vo.setBiddingName12(null);
                vo.setBiddingName13(null);
                vo.setBiddingName14(null);
//                    vo.setBiddingName15(null);
                vo.setBiddingName16(null);
                vo.setBiddingName17(null);
                vo.setBiddingName18(null);
                vo.setBiddingName19(null);
                vo.setBiddingName20(null);
            }
            if (supplyCompany.getName().equals(vo.getBiddingName16())) {
                vo.setBiddingName1(null);
                vo.setBiddingName2(null);
                vo.setBiddingName3(null);
                vo.setBiddingName4(null);
                vo.setBiddingName5(null);
                vo.setBiddingName6(null);
                vo.setBiddingName7(null);
                vo.setBiddingName8(null);
                vo.setBiddingName9(null);
                vo.setBiddingName10(null);
                vo.setBiddingName11(null);
                vo.setBiddingName12(null);
                vo.setBiddingName13(null);
                vo.setBiddingName14(null);
                vo.setBiddingName15(null);
//                    vo.setBiddingName16(null);
                vo.setBiddingName17(null);
                vo.setBiddingName18(null);
                vo.setBiddingName19(null);
                vo.setBiddingName20(null);
            }
            if (supplyCompany.getName().equals(vo.getBiddingName17())) {
                vo.setBiddingName1(null);
                vo.setBiddingName2(null);
                vo.setBiddingName3(null);
                vo.setBiddingName4(null);
                vo.setBiddingName5(null);
                vo.setBiddingName6(null);
                vo.setBiddingName7(null);
                vo.setBiddingName8(null);
                vo.setBiddingName9(null);
                vo.setBiddingName10(null);
                vo.setBiddingName11(null);
                vo.setBiddingName12(null);
                vo.setBiddingName13(null);
                vo.setBiddingName14(null);
                vo.setBiddingName15(null);
                vo.setBiddingName16(null);
//                    vo.setBiddingName17(null);
                vo.setBiddingName18(null);
                vo.setBiddingName19(null);
                vo.setBiddingName20(null);
            }
            if (supplyCompany.getName().equals(vo.getBiddingName18())) {
                vo.setBiddingName1(null);
                vo.setBiddingName2(null);
                vo.setBiddingName3(null);
                vo.setBiddingName4(null);
                vo.setBiddingName5(null);
                vo.setBiddingName6(null);
                vo.setBiddingName7(null);
                vo.setBiddingName8(null);
                vo.setBiddingName9(null);
                vo.setBiddingName10(null);
                vo.setBiddingName11(null);
                vo.setBiddingName12(null);
                vo.setBiddingName13(null);
                vo.setBiddingName14(null);
                vo.setBiddingName15(null);
                vo.setBiddingName16(null);
                vo.setBiddingName17(null);
//                    vo.setBiddingName18(null);
                vo.setBiddingName19(null);
                vo.setBiddingName20(null);
            }
            if (supplyCompany.getName().equals(vo.getBiddingName19())) {
                vo.setBiddingName1(null);
                vo.setBiddingName2(null);
                vo.setBiddingName3(null);
                vo.setBiddingName4(null);
                vo.setBiddingName5(null);
                vo.setBiddingName6(null);
                vo.setBiddingName7(null);
                vo.setBiddingName8(null);
                vo.setBiddingName9(null);
                vo.setBiddingName10(null);
                vo.setBiddingName11(null);
                vo.setBiddingName12(null);
                vo.setBiddingName13(null);
                vo.setBiddingName14(null);
                vo.setBiddingName15(null);
                vo.setBiddingName16(null);
                vo.setBiddingName17(null);
                vo.setBiddingName18(null);
//                    vo.setBiddingNameC19(null);
                vo.setBiddingName20(null);
            }
            if (supplyCompany.getName().equals(vo.getBiddingName20())) {
                vo.setBiddingName1(null);
                vo.setBiddingName2(null);
                vo.setBiddingName3(null);
                vo.setBiddingName4(null);
                vo.setBiddingName5(null);
                vo.setBiddingName6(null);
                vo.setBiddingName7(null);
                vo.setBiddingName8(null);
                vo.setBiddingName9(null);
                vo.setBiddingName10(null);
                vo.setBiddingName11(null);
                vo.setBiddingName12(null);
                vo.setBiddingName13(null);
                vo.setBiddingName14(null);
                vo.setBiddingName15(null);
                vo.setBiddingName16(null);
                vo.setBiddingName17(null);
                vo.setBiddingName18(null);
                vo.setBiddingName19(null);
//                    vo.setBiddingNameC20(null);
            }
        }
        return toList;
    }


    /**
     * 综合单价对比分析
     *
     * @param companyList
     * @param projectId
     * @param jieDuan
     * @return
     */
    public List<ComprehensiveUnitPriceCollectVo> getComprehensiveUnitPrice(List<BiddingCompany> companyList, Long projectId, Integer jieDuan) throws InvocationTargetException, IllegalAccessException {
        List<InnerBidBaseTabulation> innerBidBaseTabulationList = innerBidBaseTabulationService.getRepository().findByFlagAndProjectIdAndBidType(1, projectId, 1);

        List<ComprehensiveUnitPriceStatisVo> bdVoList = new ArrayList<>();
        for (InnerBidBaseTabulation bidBaseTabulation : innerBidBaseTabulationList) {
            ComprehensiveUnitPriceStatisVo bdVo = new ComprehensiveUnitPriceStatisVo();
            bdVo.setSort(1);
            bdVo.setBiddingNameC("标底");
            bdVo.setFenLeiName(getFenLeiName(bidBaseTabulation.getFenLei()));
            bdVo.setNameType1(bidBaseTabulation.getNameType1());
            bdVo.setNameType2(bidBaseTabulation.getNameType2());
            bdVo.setName(bidBaseTabulation.getName());
            bdVo.setFenLei(bidBaseTabulation.getFenLei());
            bdVo.setCodeNumber(bidBaseTabulation.getCodeNumber());
            bdVo.setClassificationCode(bidBaseTabulation.getClassificationCode());
            bdVo.setModelCode(bidBaseTabulation.getModelCode());
            bdVo.setGongZuoNeiRong(bidBaseTabulation.getGongZuoNeiRong());
            bdVo.setUnit(bidBaseTabulation.getUnit());
            bdVo.setGongChengLiang(bidBaseTabulation.getGongChengLiang());
            bdVo.setRenGongCost(bidBaseTabulation.getRenGongCost());
            bdVo.setZhuCaiCost(bidBaseTabulation.getZhuCaiCost());
            bdVo.setFuCaiCost(bidBaseTabulation.getFuCaiCost());
            bdVo.setJiXieCost(bidBaseTabulation.getJiXieCost());
            bdVo.setQiYeCost(bidBaseTabulation.getQiYeCost());
            bdVo.setShuiJin(bidBaseTabulation.getShuiJin());
            bdVo.setQiYeCostFillIn(bidBaseTabulation.getQiYeCostFillIn());
            bdVo.setShuiJinFillIn(bidBaseTabulation.getShuiJinFillIn());
            bdVo.setComprehensivePrice(bidBaseTabulation.getComprehensivePrice());
            bdVo.setTotalPrice(bidBaseTabulation.getTotalPrice());
            bdVoList.add(bdVo);
        }

        List<ComprehensiveUnitPriceStatisVo> gsVoList = new ArrayList<>();
        Integer sort = 1;
        for (BiddingCompany company : companyList) {
            List<InnerTabulation> innerTabulationList = innerTabulationService.getRepository().findByFlagAndBiddingCompanyIdAndJieDuan(1, company.getId(), jieDuan);
            if (innerTabulationList.size() == 0) {
                continue;
            }
            sort++;
            for (InnerTabulation tabulation : innerTabulationList) {
                ComprehensiveUnitPriceStatisVo gsVo = new ComprehensiveUnitPriceStatisVo();
                gsVo.setSort(sort);
                gsVo.setBiddingNameC(tabulation.getBiddingCompany().getSupplyCompany().getName());
                gsVo.setFenLeiName(getFenLeiName(tabulation.getFenLei()));
                gsVo.setNameType1(tabulation.getNameType1());
                gsVo.setNameType2(tabulation.getNameType2());
                gsVo.setName(tabulation.getName());
                gsVo.setFenLei(tabulation.getFenLei());
                gsVo.setBiddingCompany(tabulation.getBiddingCompany());
                gsVo.setCodeNumber(tabulation.getCodeNumber());
                gsVo.setClassificationCode(tabulation.getClassificationCode());
                gsVo.setModelCode(tabulation.getModelCode());
                gsVo.setGongZuoNeiRong(tabulation.getGongZuoNeiRong());
                gsVo.setUnit(tabulation.getUnit());
                gsVo.setGongChengLiang(tabulation.getGongChengLiang());
                gsVo.setRenGongCost(tabulation.getRenGongCost());
                gsVo.setZhuCaiCost(tabulation.getZhuCaiCost());
                gsVo.setFuCaiCost(tabulation.getFuCaiCost());
                gsVo.setJiXieCost(tabulation.getJiXieCost());
                gsVo.setQiYeCost(tabulation.getQiYeCost());
                gsVo.setShuiJin(tabulation.getShuiJin());
                gsVo.setQiYeCostFillIn(tabulation.getQiYeCostFillIn());
                gsVo.setShuiJinFillIn(tabulation.getShuiJinFillIn());
                gsVo.setComprehensivePrice(tabulation.getComprehensivePrice());
                gsVo.setTotalPrice(tabulation.getTotalPrice());
                gsVoList.add(gsVo);
            }
        }

        List<ComprehensiveUnitPriceStatisVo> minGsVoList = new ArrayList<>();
        Map<String, List<ComprehensiveUnitPriceStatisVo>> classificationCodeInList = gsVoList.stream().collect(Collectors.groupingBy(ComprehensiveUnitPriceStatisVo::getCodeNumber));
        for (Map.Entry<String, List<ComprehensiveUnitPriceStatisVo>> item : classificationCodeInList.entrySet()) {
            String code = item.getKey();
            List<ComprehensiveUnitPriceStatisVo> value = item.getValue();
            ComprehensiveUnitPriceStatisVo minGsVo = new ComprehensiveUnitPriceStatisVo(); // 初始化为null
            BigDecimal minComprehensivePrice = BigDecimal.valueOf(Long.MAX_VALUE); // 初始化为最大值

            for (ComprehensiveUnitPriceStatisVo statisVo : value) {
                BigDecimal tempComprehensivePrice = statisVo.getComprehensivePrice();
                // 检查当前vo的comprehensivePrice是否小于当前记录的最小值
                if (tempComprehensivePrice.compareTo(minComprehensivePrice) < 0) {
                    minComprehensivePrice = tempComprehensivePrice;
                    BeanUtils.copyProperties(minGsVo, statisVo);
                }
            }
            if (minGsVo != null) { // 确保至少有一个元素
                minGsVoList.add(minGsVo);
            }
        }

        //计算 与投标偏离百分比
        List<ComprehensiveUnitPriceStatisVo> valueTbList = new ArrayList<>();
        for (ComprehensiveUnitPriceStatisVo vo : gsVoList) {
            for (ComprehensiveUnitPriceStatisVo tempBd : bdVoList) {
                if (vo.getCodeNumber().equals(tempBd.getCodeNumber())) {
                    if (vo.getComprehensivePrice() != null && tempBd.getComprehensivePrice() != null) {
                        BigDecimal tempBdPrice = tempBd.getComprehensivePrice();
                        if (tempBdPrice != null && tempBdPrice.compareTo(BigDecimal.ZERO) != 0) {
                            BigDecimal biaoDi = vo.getComprehensivePrice().subtract(tempBdPrice).divide(tempBdPrice, RoundingMode.HALF_UP);
                            vo.setBiaoDi(biaoDi);
                        }
                    }
                }
            }
            for (ComprehensiveUnitPriceStatisVo tempGs : minGsVoList) {
                if (vo.getCodeNumber().equals(tempGs.getCodeNumber())) {
                    if (vo.getComprehensivePrice() != null && tempGs.getComprehensivePrice() != null) {
                        BigDecimal comprehensivePrice = tempGs.getComprehensivePrice();
                        if (comprehensivePrice.compareTo(BigDecimal.ZERO) != 0) {
                            BigDecimal huiBiao = vo.getComprehensivePrice().subtract(comprehensivePrice).divide(comprehensivePrice, RoundingMode.HALF_UP);
                            vo.setHuiBiao(huiBiao);
                        }
                    }
                }
            }
            valueTbList.add(vo);
        }


        //将标底加入valueTbList
        valueTbList.addAll(0, bdVoList);
        List<ComprehensiveUnitPriceStatisVo> sortedList = valueTbList.stream().sorted(Comparator.comparingInt(ComprehensiveUnitPriceStatisVo::getSort)
                .thenComparing(ComprehensiveUnitPriceStatisVo::getCodeNumber)).collect(Collectors.toList());

        //数据结构形式转换
        List<ComprehensiveUnitPriceCollectVo> collectVoList = new ArrayList<>();
        Map<String, List<ComprehensiveUnitPriceStatisVo>> tempMap = sortedList.stream().collect(Collectors.groupingBy(ComprehensiveUnitPriceStatisVo::getCodeNumber));
        for (Map.Entry<String, List<ComprehensiveUnitPriceStatisVo>> item : tempMap.entrySet()) {
            String name = item.getKey();
            List<ComprehensiveUnitPriceStatisVo> value = item.getValue();
            ComprehensiveUnitPriceCollectVo collectVo = new ComprehensiveUnitPriceCollectVo();
            for (ComprehensiveUnitPriceStatisVo statisVo : value) {
                if (statisVo.getSort() == 1) {
                    collectVo.setSort(statisVo.getSort());
                    collectVo.setBiddingNameC(statisVo.getBiddingNameC());
                    collectVo.setFenLeiName(getFenLeiName(statisVo.getFenLei()));
                    collectVo.setNameType1(statisVo.getNameType1());
                    collectVo.setNameType2(statisVo.getNameType2());
                    collectVo.setName(statisVo.getName());
                    collectVo.setFenLei(statisVo.getFenLei());
                    collectVo.setCodeNumber(statisVo.getCodeNumber());
                    collectVo.setClassificationCode(statisVo.getClassificationCode());
                    collectVo.setModelCode(statisVo.getModelCode());
                    collectVo.setGongZuoNeiRong(statisVo.getGongZuoNeiRong());
                    collectVo.setUnit(statisVo.getUnit());
                    collectVo.setGongChengLiang(statisVo.getGongChengLiang());
                    collectVo.setRenGongCost(statisVo.getRenGongCost());
                    collectVo.setZhuCaiCost(statisVo.getZhuCaiCost());
                    collectVo.setFuCaiCost(statisVo.getFuCaiCost());
                    collectVo.setJiXieCost(statisVo.getJiXieCost());
                    collectVo.setQiYeCost(statisVo.getQiYeCost());
                    collectVo.setShuiJin(statisVo.getShuiJin());
                    collectVo.setQiYeCostFillIn(statisVo.getQiYeCostFillIn());
                    collectVo.setShuiJinFillIn(statisVo.getShuiJinFillIn());
                    collectVo.setComprehensivePrice(statisVo.getComprehensivePrice());
                    collectVo.setTotalPrice(statisVo.getTotalPrice());
                }
                if (statisVo.getSort() == 2) {
                    collectVo.setSort(statisVo.getSort());
                    collectVo.setBiddingNameC1(statisVo.getBiddingNameC());
                    collectVo.setFenLeiName1(getFenLeiName(statisVo.getFenLei()));
                    collectVo.setRenGongCost1(statisVo.getRenGongCost());
                    collectVo.setZhuCaiCost1(statisVo.getZhuCaiCost());
                    collectVo.setFuCaiCost1(statisVo.getFuCaiCost());
                    collectVo.setJiXieCost1(statisVo.getJiXieCost());
                    collectVo.setQiYeCost1(statisVo.getQiYeCost());
                    collectVo.setShuiJin1(statisVo.getShuiJin());
                    collectVo.setQiYeCostFillIn1(statisVo.getQiYeCostFillIn());
                    collectVo.setShuiJinFillIn1(statisVo.getShuiJinFillIn());
                    collectVo.setComprehensivePrice1(statisVo.getComprehensivePrice());
                    collectVo.setTotalPrice1(statisVo.getTotalPrice());
                    collectVo.setBiaoDi1(statisVo.getBiaoDi());
                    collectVo.setHuiBiao1(statisVo.getHuiBiao());
                }
                if (statisVo.getSort() == 3) {
                    collectVo.setSort(statisVo.getSort());
                    collectVo.setBiddingNameC2(statisVo.getBiddingNameC());
                    collectVo.setFenLeiName2(getFenLeiName(statisVo.getFenLei()));
                    collectVo.setRenGongCost2(statisVo.getRenGongCost());
                    collectVo.setZhuCaiCost2(statisVo.getZhuCaiCost());
                    collectVo.setFuCaiCost2(statisVo.getFuCaiCost());
                    collectVo.setJiXieCost2(statisVo.getJiXieCost());
                    collectVo.setQiYeCost2(statisVo.getQiYeCost());
                    collectVo.setShuiJin2(statisVo.getShuiJin());
                    collectVo.setQiYeCostFillIn2(statisVo.getQiYeCostFillIn());
                    collectVo.setShuiJinFillIn2(statisVo.getShuiJinFillIn());
                    collectVo.setComprehensivePrice2(statisVo.getComprehensivePrice());
                    collectVo.setTotalPrice2(statisVo.getTotalPrice());
                    collectVo.setBiaoDi2(statisVo.getBiaoDi());
                    collectVo.setHuiBiao2(statisVo.getHuiBiao());
                }
                if (statisVo.getSort() == 4) {
                    collectVo.setSort(statisVo.getSort());
                    collectVo.setBiddingNameC3(statisVo.getBiddingNameC());
                    collectVo.setFenLeiName3(getFenLeiName(statisVo.getFenLei()));
                    collectVo.setRenGongCost3(statisVo.getRenGongCost());
                    collectVo.setZhuCaiCost3(statisVo.getZhuCaiCost());
                    collectVo.setFuCaiCost3(statisVo.getFuCaiCost());
                    collectVo.setJiXieCost3(statisVo.getJiXieCost());
                    collectVo.setQiYeCost3(statisVo.getQiYeCost());
                    collectVo.setShuiJin3(statisVo.getShuiJin());
                    collectVo.setQiYeCostFillIn3(statisVo.getQiYeCostFillIn());
                    collectVo.setShuiJinFillIn3(statisVo.getShuiJinFillIn());
                    collectVo.setComprehensivePrice3(statisVo.getComprehensivePrice());
                    collectVo.setTotalPrice3(statisVo.getTotalPrice());
                    collectVo.setBiaoDi3(statisVo.getBiaoDi());
                    collectVo.setHuiBiao3(statisVo.getHuiBiao());
                }
                if (statisVo.getSort() == 5) {
                    collectVo.setSort(statisVo.getSort());
                    collectVo.setBiddingNameC4(statisVo.getBiddingNameC());
                    collectVo.setFenLeiName4(getFenLeiName(statisVo.getFenLei()));
                    collectVo.setRenGongCost4(statisVo.getRenGongCost());
                    collectVo.setZhuCaiCost4(statisVo.getZhuCaiCost());
                    collectVo.setFuCaiCost4(statisVo.getFuCaiCost());
                    collectVo.setJiXieCost4(statisVo.getJiXieCost());
                    collectVo.setQiYeCost4(statisVo.getQiYeCost());
                    collectVo.setShuiJin4(statisVo.getShuiJin());
                    collectVo.setQiYeCostFillIn4(statisVo.getQiYeCostFillIn());
                    collectVo.setShuiJinFillIn4(statisVo.getShuiJinFillIn());
                    collectVo.setComprehensivePrice4(statisVo.getComprehensivePrice());
                    collectVo.setTotalPrice4(statisVo.getTotalPrice());
                    collectVo.setBiaoDi4(statisVo.getBiaoDi());
                    collectVo.setHuiBiao4(statisVo.getHuiBiao());
                }
                if (statisVo.getSort() == 6) {
                    collectVo.setSort(statisVo.getSort());
                    collectVo.setBiddingNameC5(statisVo.getBiddingNameC());
                    collectVo.setFenLeiName5(getFenLeiName(statisVo.getFenLei()));
                    collectVo.setRenGongCost5(statisVo.getRenGongCost());
                    collectVo.setZhuCaiCost5(statisVo.getZhuCaiCost());
                    collectVo.setFuCaiCost5(statisVo.getFuCaiCost());
                    collectVo.setJiXieCost5(statisVo.getJiXieCost());
                    collectVo.setQiYeCost5(statisVo.getQiYeCost());
                    collectVo.setShuiJin5(statisVo.getShuiJin());
                    collectVo.setQiYeCostFillIn5(statisVo.getQiYeCostFillIn());
                    collectVo.setShuiJinFillIn5(statisVo.getShuiJinFillIn());
                    collectVo.setComprehensivePrice5(statisVo.getComprehensivePrice());
                    collectVo.setTotalPrice5(statisVo.getTotalPrice());
                    collectVo.setBiaoDi5(statisVo.getBiaoDi());
                    collectVo.setHuiBiao5(statisVo.getHuiBiao());
                }
                if (statisVo.getSort() == 7) {
                    collectVo.setSort(statisVo.getSort());
                    collectVo.setBiddingNameC6(statisVo.getBiddingNameC());
                    collectVo.setFenLeiName6(getFenLeiName(statisVo.getFenLei()));
                    collectVo.setRenGongCost6(statisVo.getRenGongCost());
                    collectVo.setZhuCaiCost6(statisVo.getZhuCaiCost());
                    collectVo.setFuCaiCost6(statisVo.getFuCaiCost());
                    collectVo.setJiXieCost6(statisVo.getJiXieCost());
                    collectVo.setQiYeCost6(statisVo.getQiYeCost());
                    collectVo.setShuiJin6(statisVo.getShuiJin());
                    collectVo.setQiYeCostFillIn6(statisVo.getQiYeCostFillIn());
                    collectVo.setShuiJinFillIn6(statisVo.getShuiJinFillIn());
                    collectVo.setComprehensivePrice6(statisVo.getComprehensivePrice());
                    collectVo.setTotalPrice6(statisVo.getTotalPrice());
                    collectVo.setBiaoDi6(statisVo.getBiaoDi());
                    collectVo.setHuiBiao6(statisVo.getHuiBiao());
                }
                if (statisVo.getSort() == 8) {
                    collectVo.setSort(statisVo.getSort());
                    collectVo.setBiddingNameC7(statisVo.getBiddingNameC());
                    collectVo.setFenLeiName7(getFenLeiName(statisVo.getFenLei()));
                    collectVo.setRenGongCost7(statisVo.getRenGongCost());
                    collectVo.setZhuCaiCost7(statisVo.getZhuCaiCost());
                    collectVo.setFuCaiCost7(statisVo.getFuCaiCost());
                    collectVo.setJiXieCost7(statisVo.getJiXieCost());
                    collectVo.setQiYeCost7(statisVo.getQiYeCost());
                    collectVo.setShuiJin7(statisVo.getShuiJin());
                    collectVo.setQiYeCostFillIn7(statisVo.getQiYeCostFillIn());
                    collectVo.setShuiJinFillIn7(statisVo.getShuiJinFillIn());
                    collectVo.setComprehensivePrice7(statisVo.getComprehensivePrice());
                    collectVo.setTotalPrice7(statisVo.getTotalPrice());
                    collectVo.setBiaoDi8(statisVo.getBiaoDi());
                    collectVo.setHuiBiao8(statisVo.getHuiBiao());
                }
                if (statisVo.getSort() == 9) {
                    collectVo.setSort(statisVo.getSort());
                    collectVo.setBiddingNameC8(statisVo.getBiddingNameC());
                    collectVo.setFenLeiName8(getFenLeiName(statisVo.getFenLei()));
                    collectVo.setRenGongCost8(statisVo.getRenGongCost());
                    collectVo.setZhuCaiCost8(statisVo.getZhuCaiCost());
                    collectVo.setFuCaiCost8(statisVo.getFuCaiCost());
                    collectVo.setJiXieCost8(statisVo.getJiXieCost());
                    collectVo.setQiYeCost8(statisVo.getQiYeCost());
                    collectVo.setShuiJin8(statisVo.getShuiJin());
                    collectVo.setQiYeCostFillIn8(statisVo.getQiYeCostFillIn());
                    collectVo.setShuiJinFillIn8(statisVo.getShuiJinFillIn());
                    collectVo.setComprehensivePrice8(statisVo.getComprehensivePrice());
                    collectVo.setTotalPrice8(statisVo.getTotalPrice());
                    collectVo.setBiaoDi8(statisVo.getBiaoDi());
                    collectVo.setHuiBiao8(statisVo.getHuiBiao());
                }
                if (statisVo.getSort() == 10) {
                    collectVo.setSort(statisVo.getSort());
                    collectVo.setBiddingNameC9(statisVo.getBiddingNameC());
                    collectVo.setFenLeiName9(getFenLeiName(statisVo.getFenLei()));
                    collectVo.setRenGongCost9(statisVo.getRenGongCost());
                    collectVo.setZhuCaiCost9(statisVo.getZhuCaiCost());
                    collectVo.setFuCaiCost9(statisVo.getFuCaiCost());
                    collectVo.setJiXieCost9(statisVo.getJiXieCost());
                    collectVo.setQiYeCost9(statisVo.getQiYeCost());
                    collectVo.setShuiJin9(statisVo.getShuiJin());
                    collectVo.setQiYeCostFillIn9(statisVo.getQiYeCostFillIn());
                    collectVo.setShuiJinFillIn9(statisVo.getShuiJinFillIn());
                    collectVo.setComprehensivePrice9(statisVo.getComprehensivePrice());
                    collectVo.setTotalPrice9(statisVo.getTotalPrice());
                    collectVo.setBiaoDi9(statisVo.getBiaoDi());
                    collectVo.setHuiBiao9(statisVo.getHuiBiao());
                }
                if (statisVo.getSort() == 11) {
                    collectVo.setSort(statisVo.getSort());
                    collectVo.setBiddingNameC10(statisVo.getBiddingNameC());
                    collectVo.setFenLeiName10(getFenLeiName(statisVo.getFenLei()));
                    collectVo.setRenGongCost10(statisVo.getRenGongCost());
                    collectVo.setZhuCaiCost10(statisVo.getZhuCaiCost());
                    collectVo.setFuCaiCost10(statisVo.getFuCaiCost());
                    collectVo.setJiXieCost10(statisVo.getJiXieCost());
                    collectVo.setQiYeCost10(statisVo.getQiYeCost());
                    collectVo.setShuiJin10(statisVo.getShuiJin());
                    collectVo.setQiYeCostFillIn10(statisVo.getQiYeCostFillIn());
                    collectVo.setShuiJinFillIn10(statisVo.getShuiJinFillIn());
                    collectVo.setComprehensivePrice10(statisVo.getComprehensivePrice());
                    collectVo.setTotalPrice10(statisVo.getTotalPrice());
                    collectVo.setBiaoDi10(statisVo.getBiaoDi());
                    collectVo.setHuiBiao10(statisVo.getHuiBiao());
                }
                if (statisVo.getSort() == 12) {
                    collectVo.setSort(statisVo.getSort());
                    collectVo.setBiddingNameC11(statisVo.getBiddingNameC());
                    collectVo.setFenLeiName11(getFenLeiName(statisVo.getFenLei()));
                    collectVo.setRenGongCost11(statisVo.getRenGongCost());
                    collectVo.setZhuCaiCost11(statisVo.getZhuCaiCost());
                    collectVo.setFuCaiCost11(statisVo.getFuCaiCost());
                    collectVo.setJiXieCost11(statisVo.getJiXieCost());
                    collectVo.setQiYeCost11(statisVo.getQiYeCost());
                    collectVo.setShuiJin11(statisVo.getShuiJin());
                    collectVo.setQiYeCostFillIn11(statisVo.getQiYeCostFillIn());
                    collectVo.setShuiJinFillIn11(statisVo.getShuiJinFillIn());
                    collectVo.setComprehensivePrice11(statisVo.getComprehensivePrice());
                    collectVo.setTotalPrice11(statisVo.getTotalPrice());
                    collectVo.setBiaoDi11(statisVo.getBiaoDi());
                    collectVo.setHuiBiao11(statisVo.getHuiBiao());
                }
                if (statisVo.getSort() == 13) {
                    collectVo.setSort(statisVo.getSort());
                    collectVo.setBiddingNameC12(statisVo.getBiddingNameC());
                    collectVo.setFenLeiName12(getFenLeiName(statisVo.getFenLei()));
                    collectVo.setRenGongCost12(statisVo.getRenGongCost());
                    collectVo.setZhuCaiCost12(statisVo.getZhuCaiCost());
                    collectVo.setFuCaiCost12(statisVo.getFuCaiCost());
                    collectVo.setJiXieCost12(statisVo.getJiXieCost());
                    collectVo.setQiYeCost12(statisVo.getQiYeCost());
                    collectVo.setShuiJin12(statisVo.getShuiJin());
                    collectVo.setQiYeCostFillIn12(statisVo.getQiYeCostFillIn());
                    collectVo.setShuiJinFillIn12(statisVo.getShuiJinFillIn());
                    collectVo.setComprehensivePrice12(statisVo.getComprehensivePrice());
                    collectVo.setTotalPrice12(statisVo.getTotalPrice());
                    collectVo.setBiaoDi12(statisVo.getBiaoDi());
                    collectVo.setHuiBiao12(statisVo.getHuiBiao());
                }
                if (statisVo.getSort() == 14) {
                    collectVo.setSort(statisVo.getSort());
                    collectVo.setBiddingNameC13(statisVo.getBiddingNameC());
                    collectVo.setFenLeiName13(getFenLeiName(statisVo.getFenLei()));
                    collectVo.setRenGongCost13(statisVo.getRenGongCost());
                    collectVo.setZhuCaiCost13(statisVo.getZhuCaiCost());
                    collectVo.setFuCaiCost13(statisVo.getFuCaiCost());
                    collectVo.setJiXieCost13(statisVo.getJiXieCost());
                    collectVo.setQiYeCost13(statisVo.getQiYeCost());
                    collectVo.setShuiJin13(statisVo.getShuiJin());
                    collectVo.setQiYeCostFillIn13(statisVo.getQiYeCostFillIn());
                    collectVo.setShuiJinFillIn13(statisVo.getShuiJinFillIn());
                    collectVo.setComprehensivePrice13(statisVo.getComprehensivePrice());
                    collectVo.setTotalPrice13(statisVo.getTotalPrice());
                    collectVo.setBiaoDi13(statisVo.getBiaoDi());
                    collectVo.setHuiBiao13(statisVo.getHuiBiao());
                }
                if (statisVo.getSort() == 15) {
                    collectVo.setSort(statisVo.getSort());
                    collectVo.setBiddingNameC14(statisVo.getBiddingNameC());
                    collectVo.setFenLeiName14(getFenLeiName(statisVo.getFenLei()));
                    collectVo.setRenGongCost14(statisVo.getRenGongCost());
                    collectVo.setZhuCaiCost14(statisVo.getZhuCaiCost());
                    collectVo.setFuCaiCost14(statisVo.getFuCaiCost());
                    collectVo.setJiXieCost14(statisVo.getJiXieCost());
                    collectVo.setQiYeCost14(statisVo.getQiYeCost());
                    collectVo.setShuiJin14(statisVo.getShuiJin());
                    collectVo.setQiYeCostFillIn14(statisVo.getQiYeCostFillIn());
                    collectVo.setShuiJinFillIn14(statisVo.getShuiJinFillIn());
                    collectVo.setComprehensivePrice14(statisVo.getComprehensivePrice());
                    collectVo.setTotalPrice14(statisVo.getTotalPrice());
                    collectVo.setBiaoDi14(statisVo.getBiaoDi());
                    collectVo.setHuiBiao14(statisVo.getHuiBiao());
                }
                if (statisVo.getSort() == 16) {
                    collectVo.setSort(statisVo.getSort());
                    collectVo.setBiddingNameC15(statisVo.getBiddingNameC());
                    collectVo.setFenLeiName15(getFenLeiName(statisVo.getFenLei()));
                    collectVo.setRenGongCost15(statisVo.getRenGongCost());
                    collectVo.setZhuCaiCost15(statisVo.getZhuCaiCost());
                    collectVo.setFuCaiCost15(statisVo.getFuCaiCost());
                    collectVo.setJiXieCost15(statisVo.getJiXieCost());
                    collectVo.setQiYeCost15(statisVo.getQiYeCost());
                    collectVo.setShuiJin15(statisVo.getShuiJin());
                    collectVo.setQiYeCostFillIn15(statisVo.getQiYeCostFillIn());
                    collectVo.setShuiJinFillIn15(statisVo.getShuiJinFillIn());
                    collectVo.setComprehensivePrice15(statisVo.getComprehensivePrice());
                    collectVo.setTotalPrice15(statisVo.getTotalPrice());
                    collectVo.setBiaoDi15(statisVo.getBiaoDi());
                    collectVo.setHuiBiao15(statisVo.getHuiBiao());
                }
                if (statisVo.getSort() == 17) {
                    collectVo.setSort(statisVo.getSort());
                    collectVo.setBiddingNameC16(statisVo.getBiddingNameC());
                    collectVo.setFenLeiName16(getFenLeiName(statisVo.getFenLei()));
                    collectVo.setRenGongCost16(statisVo.getRenGongCost());
                    collectVo.setZhuCaiCost16(statisVo.getZhuCaiCost());
                    collectVo.setFuCaiCost16(statisVo.getFuCaiCost());
                    collectVo.setJiXieCost16(statisVo.getJiXieCost());
                    collectVo.setQiYeCost16(statisVo.getQiYeCost());
                    collectVo.setShuiJin16(statisVo.getShuiJin());
                    collectVo.setQiYeCostFillIn16(statisVo.getQiYeCostFillIn());
                    collectVo.setShuiJinFillIn16(statisVo.getShuiJinFillIn());
                    collectVo.setComprehensivePrice16(statisVo.getComprehensivePrice());
                    collectVo.setTotalPrice16(statisVo.getTotalPrice());
                    collectVo.setBiaoDi16(statisVo.getBiaoDi());
                    collectVo.setHuiBiao16(statisVo.getHuiBiao());
                }
                if (statisVo.getSort() == 18) {
                    collectVo.setSort(statisVo.getSort());
                    collectVo.setBiddingNameC17(statisVo.getBiddingNameC());
                    collectVo.setFenLeiName17(getFenLeiName(statisVo.getFenLei()));
                    collectVo.setRenGongCost17(statisVo.getRenGongCost());
                    collectVo.setZhuCaiCost17(statisVo.getZhuCaiCost());
                    collectVo.setFuCaiCost17(statisVo.getFuCaiCost());
                    collectVo.setJiXieCost17(statisVo.getJiXieCost());
                    collectVo.setQiYeCost17(statisVo.getQiYeCost());
                    collectVo.setShuiJin17(statisVo.getShuiJin());
                    collectVo.setQiYeCostFillIn17(statisVo.getQiYeCostFillIn());
                    collectVo.setShuiJinFillIn17(statisVo.getShuiJinFillIn());
                    collectVo.setComprehensivePrice17(statisVo.getComprehensivePrice());
                    collectVo.setTotalPrice17(statisVo.getTotalPrice());
                    collectVo.setBiaoDi17(statisVo.getBiaoDi());
                    collectVo.setHuiBiao17(statisVo.getHuiBiao());
                }
                if (statisVo.getSort() == 19) {
                    collectVo.setSort(statisVo.getSort());
                    collectVo.setBiddingNameC18(statisVo.getBiddingNameC());
                    collectVo.setFenLeiName18(getFenLeiName(statisVo.getFenLei()));
                    collectVo.setRenGongCost18(statisVo.getRenGongCost());
                    collectVo.setZhuCaiCost18(statisVo.getZhuCaiCost());
                    collectVo.setFuCaiCost18(statisVo.getFuCaiCost());
                    collectVo.setJiXieCost18(statisVo.getJiXieCost());
                    collectVo.setQiYeCost18(statisVo.getQiYeCost());
                    collectVo.setShuiJin18(statisVo.getShuiJin());
                    collectVo.setQiYeCostFillIn18(statisVo.getQiYeCostFillIn());
                    collectVo.setShuiJinFillIn18(statisVo.getShuiJinFillIn());
                    collectVo.setComprehensivePrice18(statisVo.getComprehensivePrice());
                    collectVo.setTotalPrice18(statisVo.getTotalPrice());
                    collectVo.setBiaoDi18(statisVo.getBiaoDi());
                    collectVo.setHuiBiao18(statisVo.getHuiBiao());
                }
                if (statisVo.getSort() == 20) {
                    collectVo.setSort(statisVo.getSort());
                    collectVo.setBiddingNameC19(statisVo.getBiddingNameC());
                    collectVo.setFenLeiName19(getFenLeiName(statisVo.getFenLei()));
                    collectVo.setRenGongCost19(statisVo.getRenGongCost());
                    collectVo.setZhuCaiCost19(statisVo.getZhuCaiCost());
                    collectVo.setFuCaiCost19(statisVo.getFuCaiCost());
                    collectVo.setJiXieCost19(statisVo.getJiXieCost());
                    collectVo.setQiYeCost19(statisVo.getQiYeCost());
                    collectVo.setShuiJin19(statisVo.getShuiJin());
                    collectVo.setQiYeCostFillIn19(statisVo.getQiYeCostFillIn());
                    collectVo.setShuiJinFillIn19(statisVo.getShuiJinFillIn());
                    collectVo.setComprehensivePrice19(statisVo.getComprehensivePrice());
                    collectVo.setTotalPrice19(statisVo.getTotalPrice());
                    collectVo.setBiaoDi19(statisVo.getBiaoDi());
                    collectVo.setHuiBiao19(statisVo.getHuiBiao());
                }
                if (statisVo.getSort() == 21) {
                    collectVo.setSort(statisVo.getSort());
                    collectVo.setBiddingNameC20(statisVo.getBiddingNameC());
                    collectVo.setFenLeiName20(getFenLeiName(statisVo.getFenLei()));
                    collectVo.setRenGongCost20(statisVo.getRenGongCost());
                    collectVo.setZhuCaiCost20(statisVo.getZhuCaiCost());
                    collectVo.setFuCaiCost20(statisVo.getFuCaiCost());
                    collectVo.setJiXieCost20(statisVo.getJiXieCost());
                    collectVo.setQiYeCost20(statisVo.getQiYeCost());
                    collectVo.setShuiJin20(statisVo.getShuiJin());
                    collectVo.setQiYeCostFillIn20(statisVo.getQiYeCostFillIn());
                    collectVo.setShuiJinFillIn20(statisVo.getShuiJinFillIn());
                    collectVo.setComprehensivePrice20(statisVo.getComprehensivePrice());
                    collectVo.setTotalPrice20(statisVo.getTotalPrice());
                    collectVo.setBiaoDi20(statisVo.getBiaoDi());
                    collectVo.setHuiBiao20(statisVo.getHuiBiao());
                }
            }
            collectVoList.add(collectVo);
        }

        //移除或过滤供应商中存在而标底中不存在的数据
        List<ComprehensiveUnitPriceCollectVo> filteredList = collectVoList.stream()
                .filter(vo -> !StringUtils.isEmpty(vo.getNameType1()) &&
                        !StringUtils.isEmpty(vo.getBiddingNameC()) &&
                        !StringUtils.isEmpty(vo.getName()) &&
                        !StringUtils.isEmpty(vo.getCodeNumber()))
                .collect(Collectors.toList());
//        //按getNameType1分组
//        Map<String, List<ComprehensiveUnitPriceCollectVo>> nameType1List = filteredList.stream()
//                .collect(Collectors.collectingAndThen(
//                        Collectors.groupingBy(vo -> Optional.ofNullable(vo.getNameType1()).orElse("null")),
//                        map -> {
//                            // 将"null"键替换为实际的null，以保持原始的Map结构
//                            List<ComprehensiveUnitPriceCollectVo> nullList = map.remove("null");
//                            if (nullList != null) {
//                                map.put(null, nullList);
//                            }
//                            return map;
//                        }
//                ));
        // 按NameType1属性分组
        Map<String, List<ComprehensiveUnitPriceCollectVo>> nameType1List = filteredList.stream()
                .collect(Collectors.groupingBy(ComprehensiveUnitPriceCollectVo::getNameType1));
        //小项合计
        List<ComprehensiveUnitPriceCollectVo> mapList = new ArrayList<>();
        for (Map.Entry<String, List<ComprehensiveUnitPriceCollectVo>> item : nameType1List.entrySet()) {
            String nameType1 = item.getKey();
            List<ComprehensiveUnitPriceCollectVo> value = item.getValue();

            ComprehensiveUnitPriceCollectVo newT = calculationSubtotal(value);
            value.add(0, newT);
            mapList.addAll(value);
        }
        return mapList;
    }


    /**
     * 综合单价对比分析(单个供应商)
     *
     * @param toList
     * @param supplyCompany
     * @return
     */
    public List<ComprehensiveUnitPriceCollectVo> getComprehensiveUnitPriceOne(List<ComprehensiveUnitPriceCollectVo> toList, SupplyCompany supplyCompany, List<BiddingCompany> companyItemList, Integer jieDuan) {
        if (companyItemList.size() >= 1) {
            List<InnerTabulation> tabulationList = innerTabulationService.getRepository().findByFlagAndBiddingCompanyIdAndJieDuan(1, companyItemList.get(0).getId(), jieDuan);
            if (tabulationList.size() == 0) {
                for (ComprehensiveUnitPriceCollectVo vo : toList) {
                    vo.setBiddingNameC1(null);
                    vo.setBiddingNameC2(null);
                    vo.setBiddingNameC3(null);
                    vo.setBiddingNameC4(null);
                    vo.setBiddingNameC5(null);
                    vo.setBiddingNameC6(null);
                    vo.setBiddingNameC7(null);
                    vo.setBiddingNameC8(null);
                    vo.setBiddingNameC9(null);
                    vo.setBiddingNameC10(null);
                    vo.setBiddingNameC11(null);
                    vo.setBiddingNameC12(null);
                    vo.setBiddingNameC13(null);
                    vo.setBiddingNameC14(null);
                    vo.setBiddingNameC15(null);
                    vo.setBiddingNameC16(null);
                    vo.setBiddingNameC17(null);
                    vo.setBiddingNameC18(null);
                    vo.setBiddingNameC19(null);
                    vo.setBiddingNameC20(null);
                }
                return toList;
            }
        }
        for (ComprehensiveUnitPriceCollectVo vo : toList) {
            if (supplyCompany.getName().equals(vo.getBiddingNameC1())) {
//                    vo.setBiddingNameC1(null);
                vo.setBiddingNameC2(null);
                vo.setBiddingNameC3(null);
                vo.setBiddingNameC4(null);
                vo.setBiddingNameC5(null);
                vo.setBiddingNameC6(null);
                vo.setBiddingNameC7(null);
                vo.setBiddingNameC8(null);
                vo.setBiddingNameC9(null);
                vo.setBiddingNameC10(null);
                vo.setBiddingNameC11(null);
                vo.setBiddingNameC12(null);
                vo.setBiddingNameC13(null);
                vo.setBiddingNameC14(null);
                vo.setBiddingNameC15(null);
                vo.setBiddingNameC16(null);
                vo.setBiddingNameC17(null);
                vo.setBiddingNameC18(null);
                vo.setBiddingNameC19(null);
                vo.setBiddingNameC20(null);
            }
            if (supplyCompany.getName().equals(vo.getBiddingNameC2())) {
                vo.setBiddingNameC1(null);
//                    vo.setBiddingNameC2(null);
                vo.setBiddingNameC3(null);
                vo.setBiddingNameC4(null);
                vo.setBiddingNameC5(null);
                vo.setBiddingNameC6(null);
                vo.setBiddingNameC7(null);
                vo.setBiddingNameC8(null);
                vo.setBiddingNameC9(null);
                vo.setBiddingNameC10(null);
                vo.setBiddingNameC11(null);
                vo.setBiddingNameC12(null);
                vo.setBiddingNameC13(null);
                vo.setBiddingNameC14(null);
                vo.setBiddingNameC15(null);
                vo.setBiddingNameC16(null);
                vo.setBiddingNameC17(null);
                vo.setBiddingNameC18(null);
                vo.setBiddingNameC19(null);
                vo.setBiddingNameC20(null);
            }
            if (supplyCompany.getName().equals(vo.getBiddingNameC3())) {
                vo.setBiddingNameC1(null);
                vo.setBiddingNameC2(null);
//                    vo.setBiddingNameC3(null);
                vo.setBiddingNameC4(null);
                vo.setBiddingNameC5(null);
                vo.setBiddingNameC6(null);
                vo.setBiddingNameC7(null);
                vo.setBiddingNameC8(null);
                vo.setBiddingNameC9(null);
                vo.setBiddingNameC10(null);
                vo.setBiddingNameC11(null);
                vo.setBiddingNameC12(null);
                vo.setBiddingNameC13(null);
                vo.setBiddingNameC14(null);
                vo.setBiddingNameC15(null);
                vo.setBiddingNameC16(null);
                vo.setBiddingNameC17(null);
                vo.setBiddingNameC18(null);
                vo.setBiddingNameC19(null);
                vo.setBiddingNameC20(null);
            }
            if (supplyCompany.getName().equals(vo.getBiddingNameC4())) {
                vo.setBiddingNameC1(null);
                vo.setBiddingNameC2(null);
                vo.setBiddingNameC3(null);
//                    vo.setBiddingNameC4(null);
                vo.setBiddingNameC5(null);
                vo.setBiddingNameC6(null);
                vo.setBiddingNameC7(null);
                vo.setBiddingNameC8(null);
                vo.setBiddingNameC9(null);
                vo.setBiddingNameC10(null);
                vo.setBiddingNameC11(null);
                vo.setBiddingNameC12(null);
                vo.setBiddingNameC13(null);
                vo.setBiddingNameC14(null);
                vo.setBiddingNameC15(null);
                vo.setBiddingNameC16(null);
                vo.setBiddingNameC17(null);
                vo.setBiddingNameC18(null);
                vo.setBiddingNameC19(null);
                vo.setBiddingNameC20(null);
            }
            if (supplyCompany.getName().equals(vo.getBiddingNameC5())) {
                vo.setBiddingNameC1(null);
                vo.setBiddingNameC2(null);
                vo.setBiddingNameC3(null);
                vo.setBiddingNameC4(null);
//                    vo.setBiddingNameC5(null);
                vo.setBiddingNameC6(null);
                vo.setBiddingNameC7(null);
                vo.setBiddingNameC8(null);
                vo.setBiddingNameC9(null);
                vo.setBiddingNameC10(null);
                vo.setBiddingNameC11(null);
                vo.setBiddingNameC12(null);
                vo.setBiddingNameC13(null);
                vo.setBiddingNameC14(null);
                vo.setBiddingNameC15(null);
                vo.setBiddingNameC16(null);
                vo.setBiddingNameC17(null);
                vo.setBiddingNameC18(null);
                vo.setBiddingNameC19(null);
                vo.setBiddingNameC20(null);
            }
            if (supplyCompany.getName().equals(vo.getBiddingNameC6())) {
                vo.setBiddingNameC1(null);
                vo.setBiddingNameC2(null);
                vo.setBiddingNameC3(null);
                vo.setBiddingNameC4(null);
                vo.setBiddingNameC5(null);
//                    vo.setBiddingNameC6(null);
                vo.setBiddingNameC7(null);
                vo.setBiddingNameC8(null);
                vo.setBiddingNameC9(null);
                vo.setBiddingNameC10(null);
                vo.setBiddingNameC11(null);
                vo.setBiddingNameC12(null);
                vo.setBiddingNameC13(null);
                vo.setBiddingNameC14(null);
                vo.setBiddingNameC15(null);
                vo.setBiddingNameC16(null);
                vo.setBiddingNameC17(null);
                vo.setBiddingNameC18(null);
                vo.setBiddingNameC19(null);
                vo.setBiddingNameC20(null);
            }
            if (supplyCompany.getName().equals(vo.getBiddingNameC7())) {
                vo.setBiddingNameC1(null);
                vo.setBiddingNameC2(null);
                vo.setBiddingNameC3(null);
                vo.setBiddingNameC4(null);
                vo.setBiddingNameC5(null);
                vo.setBiddingNameC6(null);
//                    vo.setBiddingNameC7(null);
                vo.setBiddingNameC8(null);
                vo.setBiddingNameC9(null);
                vo.setBiddingNameC10(null);
                vo.setBiddingNameC11(null);
                vo.setBiddingNameC12(null);
                vo.setBiddingNameC13(null);
                vo.setBiddingNameC14(null);
                vo.setBiddingNameC15(null);
                vo.setBiddingNameC16(null);
                vo.setBiddingNameC17(null);
                vo.setBiddingNameC18(null);
                vo.setBiddingNameC19(null);
                vo.setBiddingNameC20(null);
            }
            if (supplyCompany.getName().equals(vo.getBiddingNameC8())) {
                vo.setBiddingNameC1(null);
                vo.setBiddingNameC2(null);
                vo.setBiddingNameC3(null);
                vo.setBiddingNameC4(null);
                vo.setBiddingNameC5(null);
                vo.setBiddingNameC6(null);
                vo.setBiddingNameC7(null);
//                    vo.setBiddingNameC8(null);
                vo.setBiddingNameC9(null);
                vo.setBiddingNameC10(null);
                vo.setBiddingNameC11(null);
                vo.setBiddingNameC12(null);
                vo.setBiddingNameC13(null);
                vo.setBiddingNameC14(null);
                vo.setBiddingNameC15(null);
                vo.setBiddingNameC16(null);
                vo.setBiddingNameC17(null);
                vo.setBiddingNameC18(null);
                vo.setBiddingNameC19(null);
                vo.setBiddingNameC20(null);
            }
            if (supplyCompany.getName().equals(vo.getBiddingNameC9())) {
                vo.setBiddingNameC1(null);
                vo.setBiddingNameC2(null);
                vo.setBiddingNameC3(null);
                vo.setBiddingNameC4(null);
                vo.setBiddingNameC5(null);
                vo.setBiddingNameC6(null);
                vo.setBiddingNameC7(null);
                vo.setBiddingNameC8(null);
//                    vo.setBiddingNameC9(null);
                vo.setBiddingNameC10(null);
                vo.setBiddingNameC11(null);
                vo.setBiddingNameC12(null);
                vo.setBiddingNameC13(null);
                vo.setBiddingNameC14(null);
                vo.setBiddingNameC15(null);
                vo.setBiddingNameC16(null);
                vo.setBiddingNameC17(null);
                vo.setBiddingNameC18(null);
                vo.setBiddingNameC19(null);
                vo.setBiddingNameC20(null);
            }
            if (supplyCompany.getName().equals(vo.getBiddingNameC10())) {
                vo.setBiddingNameC1(null);
                vo.setBiddingNameC2(null);
                vo.setBiddingNameC3(null);
                vo.setBiddingNameC4(null);
                vo.setBiddingNameC5(null);
                vo.setBiddingNameC6(null);
                vo.setBiddingNameC7(null);
                vo.setBiddingNameC8(null);
                vo.setBiddingNameC9(null);
//                    vo.setBiddingNameC10(null);
                vo.setBiddingNameC11(null);
                vo.setBiddingNameC12(null);
                vo.setBiddingNameC13(null);
                vo.setBiddingNameC14(null);
                vo.setBiddingNameC15(null);
                vo.setBiddingNameC16(null);
                vo.setBiddingNameC17(null);
                vo.setBiddingNameC18(null);
                vo.setBiddingNameC19(null);
                vo.setBiddingNameC20(null);
            }
            if (supplyCompany.getName().equals(vo.getBiddingNameC11())) {
                vo.setBiddingNameC1(null);
                vo.setBiddingNameC2(null);
                vo.setBiddingNameC3(null);
                vo.setBiddingNameC4(null);
                vo.setBiddingNameC5(null);
                vo.setBiddingNameC6(null);
                vo.setBiddingNameC7(null);
                vo.setBiddingNameC8(null);
                vo.setBiddingNameC9(null);
                vo.setBiddingNameC10(null);
//                    vo.setBiddingNameC11(null);
                vo.setBiddingNameC12(null);
                vo.setBiddingNameC13(null);
                vo.setBiddingNameC14(null);
                vo.setBiddingNameC15(null);
                vo.setBiddingNameC16(null);
                vo.setBiddingNameC17(null);
                vo.setBiddingNameC18(null);
                vo.setBiddingNameC19(null);
                vo.setBiddingNameC20(null);
            }
            if (supplyCompany.getName().equals(vo.getBiddingNameC12())) {
                vo.setBiddingNameC1(null);
                vo.setBiddingNameC2(null);
                vo.setBiddingNameC3(null);
                vo.setBiddingNameC4(null);
                vo.setBiddingNameC5(null);
                vo.setBiddingNameC6(null);
                vo.setBiddingNameC7(null);
                vo.setBiddingNameC8(null);
                vo.setBiddingNameC9(null);
                vo.setBiddingNameC10(null);
                vo.setBiddingNameC11(null);
//                    vo.setBiddingNameC12(null);
                vo.setBiddingNameC13(null);
                vo.setBiddingNameC14(null);
                vo.setBiddingNameC15(null);
                vo.setBiddingNameC16(null);
                vo.setBiddingNameC17(null);
                vo.setBiddingNameC18(null);
                vo.setBiddingNameC19(null);
                vo.setBiddingNameC20(null);
            }
            if (supplyCompany.getName().equals(vo.getBiddingNameC13())) {
                vo.setBiddingNameC1(null);
                vo.setBiddingNameC2(null);
                vo.setBiddingNameC3(null);
                vo.setBiddingNameC4(null);
                vo.setBiddingNameC5(null);
                vo.setBiddingNameC6(null);
                vo.setBiddingNameC7(null);
                vo.setBiddingNameC8(null);
                vo.setBiddingNameC9(null);
                vo.setBiddingNameC10(null);
                vo.setBiddingNameC11(null);
                vo.setBiddingNameC12(null);
//                    vo.setBiddingNameC13(null);
                vo.setBiddingNameC14(null);
                vo.setBiddingNameC15(null);
                vo.setBiddingNameC16(null);
                vo.setBiddingNameC17(null);
                vo.setBiddingNameC18(null);
                vo.setBiddingNameC19(null);
                vo.setBiddingNameC20(null);
            }
            if (supplyCompany.getName().equals(vo.getBiddingNameC14())) {
                vo.setBiddingNameC1(null);
                vo.setBiddingNameC2(null);
                vo.setBiddingNameC3(null);
                vo.setBiddingNameC4(null);
                vo.setBiddingNameC5(null);
                vo.setBiddingNameC6(null);
                vo.setBiddingNameC7(null);
                vo.setBiddingNameC8(null);
                vo.setBiddingNameC9(null);
                vo.setBiddingNameC10(null);
                vo.setBiddingNameC11(null);
                vo.setBiddingNameC12(null);
                vo.setBiddingNameC13(null);
//                    vo.setBiddingNameC14(null);
                vo.setBiddingNameC15(null);
                vo.setBiddingNameC16(null);
                vo.setBiddingNameC17(null);
                vo.setBiddingNameC18(null);
                vo.setBiddingNameC19(null);
                vo.setBiddingNameC20(null);
            }
            if (supplyCompany.getName().equals(vo.getBiddingNameC15())) {
                vo.setBiddingNameC1(null);
                vo.setBiddingNameC2(null);
                vo.setBiddingNameC3(null);
                vo.setBiddingNameC4(null);
                vo.setBiddingNameC5(null);
                vo.setBiddingNameC6(null);
                vo.setBiddingNameC7(null);
                vo.setBiddingNameC8(null);
                vo.setBiddingNameC9(null);
                vo.setBiddingNameC10(null);
                vo.setBiddingNameC11(null);
                vo.setBiddingNameC12(null);
                vo.setBiddingNameC13(null);
                vo.setBiddingNameC14(null);
//                    vo.setBiddingNameC15(null);
                vo.setBiddingNameC16(null);
                vo.setBiddingNameC17(null);
                vo.setBiddingNameC18(null);
                vo.setBiddingNameC19(null);
                vo.setBiddingNameC20(null);
            }
            if (supplyCompany.getName().equals(vo.getBiddingNameC16())) {
                vo.setBiddingNameC1(null);
                vo.setBiddingNameC2(null);
                vo.setBiddingNameC3(null);
                vo.setBiddingNameC4(null);
                vo.setBiddingNameC5(null);
                vo.setBiddingNameC6(null);
                vo.setBiddingNameC7(null);
                vo.setBiddingNameC8(null);
                vo.setBiddingNameC9(null);
                vo.setBiddingNameC10(null);
                vo.setBiddingNameC11(null);
                vo.setBiddingNameC12(null);
                vo.setBiddingNameC13(null);
                vo.setBiddingNameC14(null);
                vo.setBiddingNameC15(null);
//                    vo.setBiddingNameC16(null);
                vo.setBiddingNameC17(null);
                vo.setBiddingNameC18(null);
                vo.setBiddingNameC19(null);
                vo.setBiddingNameC20(null);
            }
            if (supplyCompany.getName().equals(vo.getBiddingNameC17())) {
                vo.setBiddingNameC1(null);
                vo.setBiddingNameC2(null);
                vo.setBiddingNameC3(null);
                vo.setBiddingNameC4(null);
                vo.setBiddingNameC5(null);
                vo.setBiddingNameC6(null);
                vo.setBiddingNameC7(null);
                vo.setBiddingNameC8(null);
                vo.setBiddingNameC9(null);
                vo.setBiddingNameC10(null);
                vo.setBiddingNameC11(null);
                vo.setBiddingNameC12(null);
                vo.setBiddingNameC13(null);
                vo.setBiddingNameC14(null);
                vo.setBiddingNameC15(null);
                vo.setBiddingNameC16(null);
//                    vo.setBiddingNameC17(null);
                vo.setBiddingNameC18(null);
                vo.setBiddingNameC19(null);
                vo.setBiddingNameC20(null);
            }
            if (supplyCompany.getName().equals(vo.getBiddingNameC18())) {
                vo.setBiddingNameC1(null);
                vo.setBiddingNameC2(null);
                vo.setBiddingNameC3(null);
                vo.setBiddingNameC4(null);
                vo.setBiddingNameC5(null);
                vo.setBiddingNameC6(null);
                vo.setBiddingNameC7(null);
                vo.setBiddingNameC8(null);
                vo.setBiddingNameC9(null);
                vo.setBiddingNameC10(null);
                vo.setBiddingNameC11(null);
                vo.setBiddingNameC12(null);
                vo.setBiddingNameC13(null);
                vo.setBiddingNameC14(null);
                vo.setBiddingNameC15(null);
                vo.setBiddingNameC16(null);
                vo.setBiddingNameC17(null);
//                    vo.setBiddingNameC18(null);
                vo.setBiddingNameC19(null);
                vo.setBiddingNameC20(null);
            }
            if (supplyCompany.getName().equals(vo.getBiddingNameC19())) {
                vo.setBiddingNameC1(null);
                vo.setBiddingNameC2(null);
                vo.setBiddingNameC3(null);
                vo.setBiddingNameC4(null);
                vo.setBiddingNameC5(null);
                vo.setBiddingNameC6(null);
                vo.setBiddingNameC7(null);
                vo.setBiddingNameC8(null);
                vo.setBiddingNameC9(null);
                vo.setBiddingNameC10(null);
                vo.setBiddingNameC11(null);
                vo.setBiddingNameC12(null);
                vo.setBiddingNameC13(null);
                vo.setBiddingNameC14(null);
                vo.setBiddingNameC15(null);
                vo.setBiddingNameC16(null);
                vo.setBiddingNameC17(null);
                vo.setBiddingNameC18(null);
//                    vo.setBiddingNameC19(null);
                vo.setBiddingNameC20(null);
            }
            if (supplyCompany.getName().equals(vo.getBiddingNameC20())) {
                vo.setBiddingNameC1(null);
                vo.setBiddingNameC2(null);
                vo.setBiddingNameC3(null);
                vo.setBiddingNameC4(null);
                vo.setBiddingNameC5(null);
                vo.setBiddingNameC6(null);
                vo.setBiddingNameC7(null);
                vo.setBiddingNameC8(null);
                vo.setBiddingNameC9(null);
                vo.setBiddingNameC10(null);
                vo.setBiddingNameC11(null);
                vo.setBiddingNameC12(null);
                vo.setBiddingNameC13(null);
                vo.setBiddingNameC14(null);
                vo.setBiddingNameC15(null);
                vo.setBiddingNameC16(null);
                vo.setBiddingNameC17(null);
                vo.setBiddingNameC18(null);
                vo.setBiddingNameC19(null);
//                    vo.setBiddingNameC20(null);
            }
        }
        return toList;
    }


    /**
     * 分项总计
     *
     * @param collectVoList
     * @return
     */
    public ComprehensiveUnitPriceCollectVo calculationSubtotal(List<ComprehensiveUnitPriceCollectVo> collectVoList) {
        ComprehensiveUnitPriceCollectVo newT = new ComprehensiveUnitPriceCollectVo();
//        BigDecimal renGongCostCount = BigDecimal.ZERO;
//        BigDecimal zhuCaiCostCount = BigDecimal.ZERO;
//        BigDecimal fuCaiCostCount = BigDecimal.ZERO;
//        BigDecimal jiXieCostCount = BigDecimal.ZERO;
//        BigDecimal qiYeCostCount = BigDecimal.ZERO;
//        BigDecimal shuiJinCount = BigDecimal.ZERO;
        BigDecimal totalPrice = BigDecimal.ZERO;
        BigDecimal totalPrice1 = BigDecimal.ZERO;
        BigDecimal totalPrice2 = BigDecimal.ZERO;
        BigDecimal totalPrice3 = BigDecimal.ZERO;
        BigDecimal totalPrice4 = BigDecimal.ZERO;
        BigDecimal totalPrice5 = BigDecimal.ZERO;
        BigDecimal totalPrice6 = BigDecimal.ZERO;
        BigDecimal totalPrice7 = BigDecimal.ZERO;
        BigDecimal totalPrice8 = BigDecimal.ZERO;
        BigDecimal totalPrice9 = BigDecimal.ZERO;
        BigDecimal totalPrice10 = BigDecimal.ZERO;
        BigDecimal totalPrice11 = BigDecimal.ZERO;
        BigDecimal totalPrice12 = BigDecimal.ZERO;
        BigDecimal totalPrice13 = BigDecimal.ZERO;
        BigDecimal totalPrice14 = BigDecimal.ZERO;
        BigDecimal totalPrice15 = BigDecimal.ZERO;
        BigDecimal totalPrice16 = BigDecimal.ZERO;
        BigDecimal totalPrice17 = BigDecimal.ZERO;
        BigDecimal totalPrice18 = BigDecimal.ZERO;
        BigDecimal totalPrice19 = BigDecimal.ZERO;
        BigDecimal totalPrice20 = BigDecimal.ZERO;

        for (ComprehensiveUnitPriceCollectVo tabulation : collectVoList) {
//            BigDecimal gongChengLiang = tabulation.getGongChengLiang() != null ? BigDecimal.valueOf(tabulation.getGongChengLiang()) : BigDecimal.ZERO;
//            BigDecimal renGongCost = tabulation.getRenGongCost() != null ? tabulation.getRenGongCost() : BigDecimal.ZERO;
//            BigDecimal zhuCaiCost = tabulation.getZhuCaiCost() != null ? tabulation.getZhuCaiCost() : BigDecimal.ZERO;
//            BigDecimal fuCaiCost = tabulation.getFuCaiCost() != null ? tabulation.getFuCaiCost() : BigDecimal.ZERO;
//            BigDecimal jiXieCost = tabulation.getJiXieCost() != null ? tabulation.getJiXieCost() : BigDecimal.ZERO;
//            BigDecimal qiYeCost = tabulation.getQiYeCost() != null ? tabulation.getQiYeCost() : BigDecimal.ZERO;
//            BigDecimal shuiJin = tabulation.getShuiJin() != null ? tabulation.getShuiJin() : BigDecimal.ZERO;

//            renGongCostCount = renGongCostCount.add(gongChengLiang.multiply(renGongCost));
//            zhuCaiCostCount = zhuCaiCostCount.add(gongChengLiang.multiply(zhuCaiCost));
//            fuCaiCostCount = fuCaiCostCount.add(gongChengLiang.multiply(fuCaiCost));
//            jiXieCostCount = jiXieCostCount.add(gongChengLiang.multiply(jiXieCost));
//            qiYeCostCount = qiYeCostCount.add(gongChengLiang.multiply(qiYeCost));
//            shuiJinCount = shuiJinCount.add(gongChengLiang.multiply(shuiJin));
            totalPrice = totalPrice.add(tabulation.getTotalPrice() != null ? tabulation.getTotalPrice() : BigDecimal.ZERO);
            totalPrice1 = totalPrice1.add(tabulation.getTotalPrice1() != null ? tabulation.getTotalPrice1() : BigDecimal.ZERO);
            totalPrice2 = totalPrice2.add(tabulation.getTotalPrice2() != null ? tabulation.getTotalPrice2() : BigDecimal.ZERO);
            totalPrice3 = totalPrice3.add(tabulation.getTotalPrice3() != null ? tabulation.getTotalPrice3() : BigDecimal.ZERO);
            totalPrice4 = totalPrice4.add(tabulation.getTotalPrice4() != null ? tabulation.getTotalPrice4() : BigDecimal.ZERO);
            totalPrice5 = totalPrice5.add(tabulation.getTotalPrice5() != null ? tabulation.getTotalPrice5() : BigDecimal.ZERO);
            totalPrice6 = totalPrice6.add(tabulation.getTotalPrice6() != null ? tabulation.getTotalPrice6() : BigDecimal.ZERO);
            totalPrice7 = totalPrice7.add(tabulation.getTotalPrice7() != null ? tabulation.getTotalPrice7() : BigDecimal.ZERO);
            totalPrice8 = totalPrice8.add(tabulation.getTotalPrice8() != null ? tabulation.getTotalPrice8() : BigDecimal.ZERO);
            totalPrice9 = totalPrice9.add(tabulation.getTotalPrice9() != null ? tabulation.getTotalPrice9() : BigDecimal.ZERO);
            totalPrice10 = totalPrice10.add(tabulation.getTotalPrice10() != null ? tabulation.getTotalPrice10() : BigDecimal.ZERO);
            totalPrice11 = totalPrice11.add(tabulation.getTotalPrice11() != null ? tabulation.getTotalPrice11() : BigDecimal.ZERO);
            totalPrice12 = totalPrice12.add(tabulation.getTotalPrice12() != null ? tabulation.getTotalPrice12() : BigDecimal.ZERO);
            totalPrice13 = totalPrice13.add(tabulation.getTotalPrice13() != null ? tabulation.getTotalPrice13() : BigDecimal.ZERO);
            totalPrice14 = totalPrice14.add(tabulation.getTotalPrice14() != null ? tabulation.getTotalPrice14() : BigDecimal.ZERO);
            totalPrice15 = totalPrice15.add(tabulation.getTotalPrice15() != null ? tabulation.getTotalPrice15() : BigDecimal.ZERO);
            totalPrice16 = totalPrice16.add(tabulation.getTotalPrice16() != null ? tabulation.getTotalPrice16() : BigDecimal.ZERO);
            totalPrice17 = totalPrice17.add(tabulation.getTotalPrice17() != null ? tabulation.getTotalPrice17() : BigDecimal.ZERO);
            totalPrice18 = totalPrice18.add(tabulation.getTotalPrice18() != null ? tabulation.getTotalPrice18() : BigDecimal.ZERO);
            totalPrice19 = totalPrice19.add(tabulation.getTotalPrice19() != null ? tabulation.getTotalPrice19() : BigDecimal.ZERO);
            totalPrice20 = totalPrice20.add(tabulation.getTotalPrice20() != null ? tabulation.getTotalPrice20() : BigDecimal.ZERO);

        }

        newT.setName(collectVoList.get(0).getNameType1());
//        newT.setRenGongCost(renGongCostCount);
//        newT.setZhuCaiCost(zhuCaiCostCount);
//        newT.setFuCaiCost(fuCaiCostCount);
//        newT.setJiXieCost(jiXieCostCount);
//        newT.setQiYeCost(qiYeCostCount);
//        newT.setShuiJin(shuiJinCount);
        newT.setTotalPrice(totalPrice);
        newT.setTotalPrice1(totalPrice1);
        newT.setTotalPrice2(totalPrice2);
        newT.setTotalPrice3(totalPrice3);
        newT.setTotalPrice4(totalPrice4);
        newT.setTotalPrice5(totalPrice5);
        newT.setTotalPrice6(totalPrice6);
        newT.setTotalPrice7(totalPrice7);
        newT.setTotalPrice8(totalPrice8);
        newT.setTotalPrice9(totalPrice9);
        newT.setTotalPrice10(totalPrice10);
        newT.setTotalPrice11(totalPrice11);
        newT.setTotalPrice12(totalPrice12);
        newT.setTotalPrice13(totalPrice13);
        newT.setTotalPrice14(totalPrice14);
        newT.setTotalPrice15(totalPrice15);
        newT.setTotalPrice16(totalPrice16);
        newT.setTotalPrice17(totalPrice17);
        newT.setTotalPrice18(totalPrice18);
        newT.setTotalPrice19(totalPrice19);
        newT.setTotalPrice20(totalPrice20);

        return newT;
    }


    /**
     * 内、外线排名
     *
     * @param extractingList
     * @param extracting
     * @param bd
     * @return
     */
    public StatisticalBiddingVo getPaiMing(List<TabulationExtracting> extractingList, TabulationExtracting extracting, TabulationExtracting bd) throws InvocationTargetException, IllegalAccessException {
        BigDecimal bhsBaoJia = extracting.getBhsBaoJia() != null ? extracting.getBhsBaoJia() : BigDecimal.ZERO;
        BigDecimal bhszdcj = BigDecimal.ZERO;
        BigDecimal bhszdLv = BigDecimal.ZERO;
        BigDecimal bhsbdLv = BigDecimal.ZERO;
        BigDecimal chaYiLv = BigDecimal.ZERO;
        // 使用 Collections.sort() 对列表进行排序
        Collections.sort(extractingList, new Comparator<TabulationExtracting>() {
            @Override
            public int compare(TabulationExtracting o1, TabulationExtracting o2) {
                return o1.getHsBaoJia().compareTo(o2.getHsBaoJia());
            }
        });
        //找出本轮报价最低的那个供应商的数据
        BigDecimal bhsBaoJiaMin = BigDecimal.valueOf(Long.MAX_VALUE); // 初始化为最大值
        for (TabulationExtracting extracting2 : extractingList) {
            if (extracting2.getBhsBaoJia().compareTo(bhsBaoJiaMin) < 0) {
                bhsBaoJiaMin = extracting2.getBhsBaoJia();
            }
        }
        // 排名从 1 开始
        Integer paiMing = 1;
        for (TabulationExtracting temp : extractingList) {
            if (temp.getHsBaoJia().compareTo(extracting.getHsBaoJia()) >= 0) {
                break;
            }
            paiMing++;
        }
        bhszdcj = bhsBaoJia.subtract(bhsBaoJiaMin);
        if (bhsBaoJiaMin != null && bhsBaoJiaMin.compareTo(BigDecimal.ZERO) > 0) {
            bhszdLv = bhszdcj.divide(bhsBaoJiaMin, 4, RoundingMode.HALF_UP);
        }

        if (bd != null && bd.getBhsBaoJia().compareTo(BigDecimal.ZERO) > 0) {
            bhsbdLv = bhsBaoJia.subtract(bd.getBhsBaoJia()).divide(bd.getBhsBaoJia(), 4, RoundingMode.HALF_UP);
        }
        StatisticalBiddingVo tempVo = new StatisticalBiddingVo();
        tempVo.setSupplyCompany(extracting.getSupplyCompany());
        tempVo.setJieDuan(extracting.getJieDuan());
        tempVo.setShuiLv(extracting.getShuiLv());
        tempVo.setHsBaoJia(extracting.getHsBaoJia());
        tempVo.setBhsBaoJia(extracting.getBhsBaoJia());
        tempVo.setHsxzBaoJia(extracting.getHsxzBaoJia());
        tempVo.setBhszdcj(bhszdcj);
        tempVo.setBhszdLv(bhszdLv);
        tempVo.setBhsbdLv(bhsbdLv);
        tempVo.setChaYiLv(chaYiLv);
        tempVo.setPaiMing(paiMing);

        return tempVo;
    }


    /**
     * 综合排名前，先计算内外线综合在一起时的报价
     *
     * @param extractingList
     * @return
     */
    public List<StatisticalBiddingVo> getZongHeCalculate(List<TabulationExtracting> extractingList) {
        List<StatisticalBiddingVo> calculateZongHebjList = new ArrayList<>();
        //回标1到回标4的内外线数据按供应商分组
        Map<Long, List<TabulationExtracting>> sNameList = extractingList.stream().collect(Collectors.groupingBy(vo -> vo.getSupplyCompany().getId()));
        for (Map.Entry<Long, List<TabulationExtracting>> sItem : sNameList.entrySet()) {
            //理论上sValue中只有一个内线和一个外线的数据
            List<TabulationExtracting> sValue = sItem.getValue();
            BigDecimal innerHsBaoJia = BigDecimal.ZERO;
            BigDecimal outerHsBaoJia = BigDecimal.ZERO;
            BigDecimal innerHsxzBaoJia = BigDecimal.ZERO;
            BigDecimal outerHsxzBaoJia = BigDecimal.ZERO;
            for (TabulationExtracting s : sValue) {
                if (s.getInnerOuterType() == 1) {
                    innerHsBaoJia = s.getHsBaoJia();
                    innerHsxzBaoJia = s.getHsxzBaoJia();
                }
                if (s.getInnerOuterType() == 2) {
                    outerHsBaoJia = s.getHsBaoJia();
                    outerHsxzBaoJia = s.getHsxzBaoJia();
                }
            }
            BigDecimal hsBaoJia = innerHsBaoJia.add(outerHsBaoJia);
            BigDecimal hsxzBaoJia = innerHsxzBaoJia.add(outerHsxzBaoJia);
            BigDecimal bhsBaoJia = hsBaoJia.divide(sValue.get(0).getShuiLv().add(BigDecimal.ONE), 2, RoundingMode.HALF_UP);

            StatisticalBiddingVo tempItem = new StatisticalBiddingVo();
            tempItem.setSupplyCompany(sValue.get(0).getSupplyCompany());
            tempItem.setJieDuan(sValue.get(0).getJieDuan());
            tempItem.setShuiLv(sValue.get(0).getShuiLv());
            tempItem.setHsBaoJia(hsBaoJia);
            tempItem.setBhsBaoJia(bhsBaoJia);
            tempItem.setHsxzBaoJia(hsxzBaoJia);
            tempItem.setBhszdcj(null);
            tempItem.setBhszdLv(null);
            tempItem.setBhsbdLv(null);
            tempItem.setChaYiLv(null);
            tempItem.setPaiMing(null);
            calculateZongHebjList.add(tempItem);
        }
        return calculateZongHebjList;
    }


    /**
     * 综合排名
     *
     * @param calculateZongHebjList
     * @param extractings
     * @param hsBaoJiaBdZongHe
     * @return
     */
    public StatisticalBiddingVo getZongHePaiMing(List<StatisticalBiddingVo> calculateZongHebjList, List<TabulationExtracting> extractings, BigDecimal hsBaoJiaBdZongHe) {
        StatisticalBiddingVo tempVo = new StatisticalBiddingVo();
        // 使用 Collections.sort() 对列表进行排序
        Collections.sort(calculateZongHebjList, new Comparator<StatisticalBiddingVo>() {
            @Override
            public int compare(StatisticalBiddingVo o1, StatisticalBiddingVo o2) {
                return o1.getHsBaoJia().compareTo(o2.getHsBaoJia());
            }
        });
        //找出本轮不含税报价最低的那个供应商的数据
        BigDecimal bhsBaoJiaZongHeMin = BigDecimal.valueOf(Long.MAX_VALUE); // 初始化为最大值
        for (StatisticalBiddingVo z : calculateZongHebjList) {
            if (z.getBhsBaoJia() != null && z.getBhsBaoJia().compareTo(bhsBaoJiaZongHeMin) < 0) {
                bhsBaoJiaZongHeMin = z.getBhsBaoJia();
            }
        }

        BigDecimal innerHsBaoJia = BigDecimal.ZERO;
        BigDecimal outerHsBaoJia = BigDecimal.ZERO;
        BigDecimal innerHsxzBaoJia = BigDecimal.ZERO;
        BigDecimal outerHsxzBaoJia = BigDecimal.ZERO;
        for (TabulationExtracting extracting : extractings) {
            if (extracting.getInnerOuterType() == 1) {
                innerHsBaoJia = extracting.getHsBaoJia();
                innerHsxzBaoJia = extracting.getHsxzBaoJia();
            }
            if (extracting.getInnerOuterType() == 2) {
                outerHsBaoJia = extracting.getHsBaoJia();
                outerHsxzBaoJia = extracting.getHsxzBaoJia();
            }
        }

        //准备当前供应商综合排名所需数据
        BigDecimal hsBaoJia = innerHsBaoJia.add(outerHsBaoJia);
        BigDecimal hsxzBaoJia = innerHsxzBaoJia.add(outerHsxzBaoJia);
        BigDecimal bhsBaoJia = BigDecimal.ZERO;
        if (extractings.get(0).getShuiLv().add(BigDecimal.ONE).longValue() > 0) {
            bhsBaoJia = hsBaoJia.divide(extractings.get(0).getShuiLv().add(BigDecimal.ONE), 2, RoundingMode.HALF_UP);
        }
        BigDecimal bhszdLv = BigDecimal.ZERO;
        if (bhsBaoJiaZongHeMin != null && bhsBaoJiaZongHeMin.longValue() > 0) {
            bhszdLv = bhsBaoJia.divide(bhsBaoJiaZongHeMin, 4, RoundingMode.HALF_UP).subtract(BigDecimal.ONE);
        }
        BigDecimal bhsbdLv = BigDecimal.ZERO;
        if (hsBaoJiaBdZongHe != null && hsBaoJiaBdZongHe.longValue() > 0) {
            bhsbdLv = hsBaoJia.subtract(hsBaoJiaBdZongHe).divide(hsBaoJiaBdZongHe, 4, RoundingMode.HALF_UP);
        }
//        BigDecimal chaYiLv = BigDecimal.ZERO;
        // 排名从1 开始
        Integer paiMing = 1;
        for (StatisticalBiddingVo vo : calculateZongHebjList) {
            if (vo.getHsBaoJia().compareTo(hsBaoJia) >= 0) {
                break;
            }
            paiMing++;
        }

        tempVo.setSupplyCompany(extractings.get(0).getSupplyCompany());
        tempVo.setJieDuan(extractings.get(0).getJieDuan());
        tempVo.setShuiLv(extractings.get(0).getShuiLv());
        tempVo.setHsBaoJia(hsBaoJia);
        tempVo.setBhsBaoJia(bhsBaoJia);
        tempVo.setHsxzBaoJia(hsxzBaoJia);
        tempVo.setBhszdcj(null);
        tempVo.setBhszdLv(bhszdLv);
        tempVo.setBhsbdLv(bhsbdLv);
//        tempVo.setChaYiLv(chaYiLv);
        tempVo.setPaiMing(paiMing);

        return tempVo;
    }


    /**
     * 选择项目
     *
     * @param projectId
     * @param province
     * @param city
     * @return
     */
    public List<Map<String, Object>> choiceProject(Long projectId, String province, String city) {
        List<Map<String, Object>> mapList = new ArrayList<>();
        HashMap hashMap = new HashMap();
        hashMap.put("project.flag", 1);
//        hashMap.put("project.id_ne", projectId);
        if (StringUtils.isNotEmpty(province)) {
            hashMap.put("project.province", province);
        }
        if (StringUtils.isNotEmpty(city)) {
            hashMap.put("project.city", city);
        }
        hashMap.put("flag", 1);
        hashMap.put("bidStatus", 1);
        hashMap.put("innerOuterType", 1);
        List<BiddingCompany> innerCompanyList = biddingCompanyService.queryToList(hashMap, null);
        for (BiddingCompany company : innerCompanyList) {
            List<InnerTabulation> innerDbTabulationList = innerTabulationService.getRepository().findByFlagAndBiddingCompanyIdAndJieDuan(1, company.getId(), 6);
            List<InnerTabulation> innerSsdbTabulationList = innerTabulationService.getRepository().findByFlagAndBiddingCompanyIdAndJieDuan(1, company.getId(), 8);
            if (innerDbTabulationList.size() == 0 && innerSsdbTabulationList.size() == 0) {
                continue;
            } else {
                Map<String, Object> tempMap = new HashMap<>();
                tempMap.put("project", company.getProject());
                tempMap.put("supplyCompany", company.getSupplyCompany());
                tempMap.put("biddingCompany", company);
                mapList.add(tempMap);
            }
        }
        return mapList;
    }

    /**
     * 计算并保存定标最终沉淀数据--首次
     *
     * @param projectId
     */
    public void handlePrecipitate(Long projectId) {
        Project project = projectService.findOne(projectId);

        //计算 定标 时评标公司及清单沉淀数据
        List<FeXiExtractingVo> voList = getDbSupplyData(project);
        List<FeXiExtractingVo> gsList = new ArrayList<>();
        FeXiExtractingVo bdItemVo = null;
        for (FeXiExtractingVo vo : voList) {
            if (vo.getSupplyCompany() == null && vo.getJieDuan() == 1) {
                bdItemVo = vo;
            } else if (vo.getSupplyCompany() != null && vo.getJieDuan() == 6) {
                gsList.add(vo);
            }
        }
        //将FeXiExtractingVo的数据行转列存储到Precipitate表中
        Map<Long, List<FeXiExtractingVo>> suNameList = gsList.stream().collect(Collectors.groupingBy(vo -> vo.getSupplyCompany().getId()));
        for (Map.Entry<Long, List<FeXiExtractingVo>> sItem : suNameList.entrySet()) {
            List<FeXiExtractingVo> sValue = sItem.getValue();
            List<PrecipitateDb> precipitateDbList = rowToColumnDb(project, sValue, bdItemVo, null);
            //计算标底与相应供应商的差异（B-A、B-C）
            for (PrecipitateDb p : precipitateDbList) {
                if (p.getBasePriceAjm() != null && p.getDingBiaoPriceBjm() != null) {
                    p.setBaPriceJm(p.getDingBiaoPriceBjm().subtract(p.getBasePriceAjm()));
                }
                if (p.getChoiceBasePriceCjm() != null && p.getDingBiaoPriceBjm() != null) {
                    p.setBcPriceJm(p.getDingBiaoPriceBjm().subtract(p.getChoiceBasePriceCjm()));
                }
            }
            precipitateDbService.save(precipitateDbList);
        }
    }


    /**
     * 计算并保存定标最终沉淀数据--添加对比项目
     *
     * @param projectId
     * @param choiceProjectId
     * @param choiceSupplyCompanyId
     */
    public void handlePrecipitateToProject(Long projectId, Long choiceProjectId, Long choiceSupplyCompanyId) {
        Project project = projectService.findOne(projectId);
        Project choiceProject = projectService.findOne(choiceProjectId);
        SupplyCompany choiceSupplyCompany = supplyCompanyService.findOne(choiceSupplyCompanyId);
        BigDecimal zongArea = new BigDecimal(choiceProject.getZongArea().toString());
        BigDecimal zhuZhaiArea = new BigDecimal(choiceProject.getZhuZhaiArea().toString());
        BigDecimal diXiaShiArea = new BigDecimal(choiceProject.getDiXiaShiArea().toString());
        BigDecimal shangYeArea = new BigDecimal(choiceProject.getShangYeArea().toString());
        HashMap hashMap = new HashMap();
        hashMap.put("project.flag", 1);
        hashMap.put("project.id", choiceProjectId);
        hashMap.put("supplyCompany.id", choiceSupplyCompanyId);
        hashMap.put("flag", 1);
        hashMap.put("bidStatus", 1);
        hashMap.put("innerOuterType", 1);
        //按上面的条件查出来的BiddingCompany理论上只有一条数据
        List<BiddingCompany> innerCompanyList = biddingCompanyService.queryToList(hashMap, null);

        List<FeXiExtractingVo> choiceVoList = new ArrayList<>();
        for (BiddingCompany company : innerCompanyList) {
            List<InnerTabulation> innerDbTabulationList = innerTabulationService.getRepository().findByFlagAndBiddingCompanyIdAndJieDuan(1, company.getId(), 6);
            List<InnerTabulation> innerSsdbTabulationList = innerTabulationService.getRepository().findByFlagAndBiddingCompanyIdAndJieDuan(1, company.getId(), 8);
            //已经有供应商清单到达实施定标阶段时不再查询数据生成新的定标阶段的数据沉淀
            if (innerSsdbTabulationList.size() > 0) {
                innerDbTabulationList = null;
            }
            if (innerDbTabulationList != null) {
                hashMap.put("innerOuterType", 2);
                hashMap.put("supplyCompany.id", company.getSupplyCompany().getId());
                List<BiddingCompany> outerCompanyList = biddingCompanyService.queryToList(hashMap, null);
                //理论上outerCompanyList没有或只有一个数据
                BigDecimal outerZdf = BigDecimal.ZERO;
                if (outerCompanyList.size() == 1) {
                    List<OuterTabulation> outerDbTabulationList = outerTabulationService.getRepository().findByFlagAndBiddingCompanyIdAndJieDuan(1, outerCompanyList.get(0).getId(), 6);
                    if (outerDbTabulationList.size() > 0) {
                        //拿到外线统计数据所需值
                        for (OuterTabulation ou : outerDbTabulationList) {
                            if (ou.getTotalPriceOriginal() != null) {
                                outerZdf = outerZdf.add(ou.getTotalPriceOriginal());
                            }
                        }
                    }
                }
                FeXiExtractingVo dbCompanyVo = handleFenXi(innerDbTabulationList, null);
                //内线合同总单方
                dbCompanyVo.setInnerZdf(dbCompanyVo.getGygTotalPrice().add(dbCompanyVo.getDygTotalPriceCount()).add(dbCompanyVo.getByqTotalPriceCount()).add(dbCompanyVo.getDbTotalPriceCount())
                        .add(dbCompanyVo.getDbxTotalPriceCount()).add(dbCompanyVo.getDydlTotalPriceCount()).add(dbCompanyVo.getMxcTotalPrice()).add(dbCompanyVo.getGydlTotalPrice())
                        .add(dbCompanyVo.getPdxTotalPrice()).add(dbCompanyVo.getTsTotalPrice()).add(dbCompanyVo.getSxfTotalPrice()).add(dbCompanyVo.getQtTotalPrice()));
                dbCompanyVo.setProject(project);
                dbCompanyVo.setSupplyCompany(company.getSupplyCompany());
                dbCompanyVo.setOuterZdf(outerZdf);
                dbCompanyVo.setJieDuan(6);
                choiceVoList.add(dbCompanyVo);
            }
//            //实施定标无对比项目
//            if (innerSsdbTabulationList.size() > 0) {
//                hashMap.put("innerOuterType", 2);
//                hashMap.put("supplyCompany.id", company.getSupplyCompany().getId());
//                List<BiddingCompany> outerCompanyList = biddingCompanyService.queryToList(hashMap, null);
//                //理论上outerCompanyList没有或只有一个数据
//                BigDecimal outerZdf = BigDecimal.ZERO;
//                if (outerCompanyList.size() == 1) {
//                    List<OuterTabulation> outerSsdbTabulationList = outerTabulationService.getRepository().findByFlagAndBiddingCompanyIdAndJieDuan(1, outerCompanyList.get(0).getId(), 8);
//                    if (outerSsdbTabulationList.size() > 0) {
//                        //拿到外线统计数据所需值
//                        for (OuterTabulation ou : outerSsdbTabulationList) {
//                            if (ou.getTotalPriceOriginal() != null) {
//                                outerZdf = outerZdf.add(ou.getTotalPriceOriginal());
//                            }
//                        }
//                    }
//                }
//                FeXiExtractingVo ssdbCompanyVo = handleFenXi(innerSsdbTabulationList, null);
//                //内线合同总单方
//                ssdbCompanyVo.setInnerZdf(ssdbCompanyVo.getGygTotalPrice().add(ssdbCompanyVo.getDygTotalPriceCount()).add(ssdbCompanyVo.getByqTotalPriceCount()).add(ssdbCompanyVo.getHbTotalPriceCount()
//                        .add(ssdbCompanyVo.getDydlTotalPriceCount()).add(ssdbCompanyVo.getMxcTotalPrice()).add(ssdbCompanyVo.getGydlTotalPrice()).add(ssdbCompanyVo.getPdxTotalPrice())
//                        .add(ssdbCompanyVo.getTsTotalPrice()).add(ssdbCompanyVo.getSxfTotalPrice()).add(ssdbCompanyVo.getQtTotalPrice())));
//                ssdbCompanyVo.setProject(project);
//                ssdbCompanyVo.setSupplyCompany(company.getSupplyCompany());
//                ssdbCompanyVo.setOuterZdf(outerZdf);
//                ssdbCompanyVo.setJieDuan(8);
//                choiceVoList.add(ssdbCompanyVo);
//            }
        }

        //查询数据
        HashMap bdMap = new HashMap();
        bdMap.put("project.id", projectId);
        bdMap.put("flag", 1);
        List<PrecipitateDb> precipitateDbList = precipitateDbService.queryToList(bdMap, null);
        Map<Long, List<PrecipitateDb>> suNameList = precipitateDbList.stream().collect(Collectors.groupingBy(vo -> vo.getSupplyCompany().getId()));
        for (Map.Entry<Long, List<PrecipitateDb>> sItem : suNameList.entrySet()) {
            List<PrecipitateDb> sValue = sItem.getValue();
            for (PrecipitateDb pDb : sValue) {
                pDb.setChoiceProject(choiceProject);
                pDb.setChoiceSupplyCompany(choiceSupplyCompany);
                pDb.setChoiceJieDuan(choiceVoList.get(0).getJieDuan());
                if (pDb.getFenXiType() == 1) {
                    pDb.setChoiceBasePriceC(choiceVoList.get(0).getOuterZdf());
                }
                if (pDb.getFenXiType() == 2) {
                    pDb.setChoiceBasePriceC(choiceVoList.get(0).getInnerZdf());
                    if (choiceVoList.get(0).getInnerZdf() != null && zongArea.compareTo(BigDecimal.ZERO) != 0) {
                        pDb.setChoiceBasePriceCjm(choiceVoList.get(0).getInnerZdf().divide(zongArea, 2, RoundingMode.HALF_UP));
                    }
                }
                if (pDb.getFenXiType() == 3) {
                    pDb.setChoiceBasePriceC(choiceVoList.get(0).getInnerFhdf());
                    if (choiceVoList.get(0).getInnerFhdf() != null && zongArea.compareTo(BigDecimal.ZERO) != 0) {
                        pDb.setChoiceBasePriceCjm(choiceVoList.get(0).getInnerFhdf().divide(zongArea, 2, RoundingMode.HALF_UP));
                    }
                }
                if (pDb.getFenXiType() == 4) {
                    pDb.setChoiceBasePriceC(choiceVoList.get(0).getGygTotalPrice());
                    if (choiceVoList.get(0).getGygTotalPrice() != null && zongArea.compareTo(BigDecimal.ZERO) != 0) {
                        pDb.setChoiceBasePriceCjm(choiceVoList.get(0).getGygTotalPrice().divide(zongArea, 2, RoundingMode.HALF_UP));
                    }
                }
                if (pDb.getFenXiType() == 5) {
                    pDb.setChoiceBasePriceC(choiceVoList.get(0).getDygzzTotalPrice());
                    if (choiceVoList.get(0).getDygzzTotalPrice() != null && zhuZhaiArea.compareTo(BigDecimal.ZERO) != 0) {
                        pDb.setChoiceBasePriceCjm(choiceVoList.get(0).getDygzzTotalPrice().divide(zhuZhaiArea, 2, RoundingMode.HALF_UP));
                    }
                }
                if (pDb.getFenXiType() == 6) {
                    pDb.setChoiceBasePriceC(choiceVoList.get(0).getDygfjTotalPrice());
                    if (choiceVoList.get(0).getDygfjTotalPrice() != null && diXiaShiArea.compareTo(BigDecimal.ZERO) != 0) {
                        pDb.setChoiceBasePriceCjm(choiceVoList.get(0).getDygfjTotalPrice().divide(diXiaShiArea, 2, RoundingMode.HALF_UP));
                    }
                }
                if (pDb.getFenXiType() == 7) {
                    pDb.setChoiceBasePriceC(choiceVoList.get(0).getDygsyTotalPrice());
                    if (choiceVoList.get(0).getDygsyTotalPrice() != null && shangYeArea.compareTo(BigDecimal.ZERO) != 0) {
                        pDb.setChoiceBasePriceCjm(choiceVoList.get(0).getDygsyTotalPrice().divide(shangYeArea, 2, RoundingMode.HALF_UP));
                    }
                }
                if (pDb.getFenXiType() == 8) {
                    pDb.setChoiceBasePriceC(choiceVoList.get(0).getDygcdzTotalPrice());
                    if (choiceVoList.get(0).getDygcdzTotalPrice() != null && diXiaShiArea.compareTo(BigDecimal.ZERO) != 0) {
                        pDb.setChoiceBasePriceCjm(choiceVoList.get(0).getDygcdzTotalPrice().divide(diXiaShiArea, 2, RoundingMode.HALF_UP));
                    }
                }
                if (pDb.getFenXiType() == 9) {
                    pDb.setChoiceBasePriceC(choiceVoList.get(0).getDygTotalPriceCount());
                    BigDecimal choiceBasePriceCjm = BigDecimal.ZERO;
                    if (choiceVoList.get(0).getDygzzTotalPrice() != null && zhuZhaiArea.compareTo(BigDecimal.ZERO) != 0) {
                        choiceBasePriceCjm = choiceBasePriceCjm.add(choiceVoList.get(0).getDygzzTotalPrice().divide(zhuZhaiArea, 2, RoundingMode.HALF_UP));
                    }
                    if (choiceVoList.get(0).getDygfjTotalPrice() != null && diXiaShiArea.compareTo(BigDecimal.ZERO) != 0) {
                        choiceBasePriceCjm = choiceBasePriceCjm.add(choiceVoList.get(0).getDygfjTotalPrice().divide(diXiaShiArea, 2, RoundingMode.HALF_UP));
                    }
                    if (choiceVoList.get(0).getDygsyTotalPrice() != null && shangYeArea.compareTo(BigDecimal.ZERO) != 0) {
                        choiceBasePriceCjm = choiceBasePriceCjm.add(choiceVoList.get(0).getDygsyTotalPrice().divide(shangYeArea, 2, RoundingMode.HALF_UP));
                    }
                    if (choiceVoList.get(0).getDygcdzTotalPrice() != null && diXiaShiArea.compareTo(BigDecimal.ZERO) != 0) {
                        choiceBasePriceCjm = choiceBasePriceCjm.add(choiceVoList.get(0).getDygcdzTotalPrice().divide(diXiaShiArea, 2, RoundingMode.HALF_UP));
                    }
                    pDb.setChoiceBasePriceCjm(choiceBasePriceCjm);
                }
                if (pDb.getFenXiType() == 10) {
                    pDb.setChoiceBasePriceC(choiceVoList.get(0).getByqzzTotalPrice());
                    if (choiceVoList.get(0).getByqzzTotalPrice() != null && zhuZhaiArea.compareTo(BigDecimal.ZERO) != 0) {
                        pDb.setChoiceBasePriceCjm(choiceVoList.get(0).getByqzzTotalPrice().divide(zhuZhaiArea, 2, RoundingMode.HALF_UP));
                    }
                }
                if (pDb.getFenXiType() == 11) {
                    pDb.setChoiceBasePriceC(choiceVoList.get(0).getByqfjTotalPrice());
                    if (choiceVoList.get(0).getByqfjTotalPrice() != null && diXiaShiArea.compareTo(BigDecimal.ZERO) != 0) {
                        pDb.setChoiceBasePriceCjm(choiceVoList.get(0).getByqfjTotalPrice().divide(diXiaShiArea, 2, RoundingMode.HALF_UP));
                    }
                }
                if (pDb.getFenXiType() == 12) {
                    pDb.setChoiceBasePriceC(choiceVoList.get(0).getByqsyTotalPrice());
                    if (choiceVoList.get(0).getByqsyTotalPrice() != null && shangYeArea.compareTo(BigDecimal.ZERO) != 0) {
                        pDb.setChoiceBasePriceCjm(choiceVoList.get(0).getByqsyTotalPrice().divide(shangYeArea, 2, RoundingMode.HALF_UP));
                    }
                }
                if (pDb.getFenXiType() == 13) {
                    pDb.setChoiceBasePriceC(choiceVoList.get(0).getByqcdzTotalPrice());
                    if (choiceVoList.get(0).getByqcdzTotalPrice() != null && diXiaShiArea.compareTo(BigDecimal.ZERO) != 0) {
                        pDb.setChoiceBasePriceCjm(choiceVoList.get(0).getByqcdzTotalPrice().divide(diXiaShiArea, 2, RoundingMode.HALF_UP));
                    }
                }
                if (pDb.getFenXiType() == 14) {
                    pDb.setChoiceBasePriceC(choiceVoList.get(0).getByqTotalPriceCount());
                    BigDecimal choiceBasePriceCjm = BigDecimal.ZERO;
                    if (choiceVoList.get(0).getByqzzTotalPrice() != null && zhuZhaiArea.compareTo(BigDecimal.ZERO) != 0) {
                        choiceBasePriceCjm = choiceBasePriceCjm.add(choiceVoList.get(0).getByqzzTotalPrice().divide(zhuZhaiArea, 2, RoundingMode.HALF_UP));
                    }
                    if (choiceVoList.get(0).getByqfjTotalPrice() != null && diXiaShiArea.compareTo(BigDecimal.ZERO) != 0) {
                        choiceBasePriceCjm = choiceBasePriceCjm.add(choiceVoList.get(0).getByqfjTotalPrice().divide(diXiaShiArea, 2, RoundingMode.HALF_UP));
                    }
                    if (choiceVoList.get(0).getByqsyTotalPrice() != null && shangYeArea.compareTo(BigDecimal.ZERO) != 0) {
                        choiceBasePriceCjm = choiceBasePriceCjm.add(choiceVoList.get(0).getByqsyTotalPrice().divide(shangYeArea, 2, RoundingMode.HALF_UP));
                    }
                    if (choiceVoList.get(0).getByqcdzTotalPrice() != null && diXiaShiArea.compareTo(BigDecimal.ZERO) != 0) {
                        choiceBasePriceCjm = choiceBasePriceCjm.add(choiceVoList.get(0).getByqcdzTotalPrice().divide(diXiaShiArea, 2, RoundingMode.HALF_UP));
                    }
                    pDb.setChoiceBasePriceCjm(choiceBasePriceCjm);
                }
//                if (pDb.getFenXiType() == 15) {
//                    pDb.setChoiceBasePriceC(choiceVoList.get(0).getHbzzTotalPrice());
//                    if (choiceVoList.get(0).getHbzzTotalPrice() != null && zhuZhaiArea.compareTo(BigDecimal.ZERO) != 0) {
//                        pDb.setChoiceBasePriceCjm(choiceVoList.get(0).getHbzzTotalPrice().divide(zhuZhaiArea, 2, RoundingMode.HALF_UP));
//                    }
//                }
//                if (pDb.getFenXiType() == 16) {
//                    pDb.setChoiceBasePriceC(choiceVoList.get(0).getHbfjTotalPrice());
//                    if (choiceVoList.get(0).getHbfjTotalPrice() != null && diXiaShiArea.compareTo(BigDecimal.ZERO) != 0) {
//                        pDb.setChoiceBasePriceCjm(choiceVoList.get(0).getHbfjTotalPrice().divide(diXiaShiArea, 2, RoundingMode.HALF_UP));
//                    }
//                }
//                if (pDb.getFenXiType() == 17) {
//                    pDb.setChoiceBasePriceC(choiceVoList.get(0).getHbsyTotalPrice());
//                    if (choiceVoList.get(0).getHbsyTotalPrice() != null && shangYeArea.compareTo(BigDecimal.ZERO) != 0) {
//                        pDb.setChoiceBasePriceCjm(choiceVoList.get(0).getHbsyTotalPrice().divide(shangYeArea, 2, RoundingMode.HALF_UP));
//                    }
//                }
//                if (pDb.getFenXiType() == 18) {
//                    pDb.setChoiceBasePriceC(choiceVoList.get(0).getHbcdzTotalPrice());
//                    if (choiceVoList.get(0).getHbcdzTotalPrice() != null && diXiaShiArea.compareTo(BigDecimal.ZERO) != 0) {
//                        pDb.setChoiceBasePriceCjm(choiceVoList.get(0).getHbcdzTotalPrice().divide(diXiaShiArea, 2, RoundingMode.HALF_UP));
//                    }
//                }
//                if (pDb.getFenXiType() == 19) {
//                    pDb.setChoiceBasePriceC(choiceVoList.get(0).getHbTotalPriceCount());
//                    BigDecimal choiceBasePriceCjm = BigDecimal.ZERO;
//                    if (choiceVoList.get(0).getHbzzTotalPrice() != null && zhuZhaiArea.compareTo(BigDecimal.ZERO) != 0) {
//                        choiceBasePriceCjm = choiceBasePriceCjm.add(choiceVoList.get(0).getHbzzTotalPrice().divide(zhuZhaiArea, 2, RoundingMode.HALF_UP));
//                    }
//                    if (choiceVoList.get(0).getHbfjTotalPrice() != null && diXiaShiArea.compareTo(BigDecimal.ZERO) != 0) {
//                        choiceBasePriceCjm = choiceBasePriceCjm.add(choiceVoList.get(0).getHbfjTotalPrice().divide(diXiaShiArea, 2, RoundingMode.HALF_UP));
//                    }
//                    if (choiceVoList.get(0).getHbsyTotalPrice() != null && shangYeArea.compareTo(BigDecimal.ZERO) != 0) {
//                        choiceBasePriceCjm = choiceBasePriceCjm.add(choiceVoList.get(0).getHbsyTotalPrice().divide(shangYeArea, 2, RoundingMode.HALF_UP));
//                    }
//                    if (choiceVoList.get(0).getHbcdzTotalPrice() != null && diXiaShiArea.compareTo(BigDecimal.ZERO) != 0) {
//                        choiceBasePriceCjm = choiceBasePriceCjm.add(choiceVoList.get(0).getHbcdzTotalPrice().divide(diXiaShiArea, 2, RoundingMode.HALF_UP));
//                    }
//                    pDb.setChoiceBasePriceCjm(choiceBasePriceCjm);
//                }
                if (pDb.getFenXiType() == 15) {
                    pDb.setChoiceBasePriceC(choiceVoList.get(0).getDbzzTotalPrice());
                    if (choiceVoList.get(0).getDbzzTotalPrice() != null && zhuZhaiArea.compareTo(BigDecimal.ZERO) != 0) {
                        pDb.setChoiceBasePriceCjm(choiceVoList.get(0).getDbzzTotalPrice().divide(zhuZhaiArea, 2, RoundingMode.HALF_UP));
                    }
                }
                if (pDb.getFenXiType() == 16) {
                    pDb.setChoiceBasePriceC(choiceVoList.get(0).getDbfjTotalPrice());
                    if (choiceVoList.get(0).getDbfjTotalPrice() != null && diXiaShiArea.compareTo(BigDecimal.ZERO) != 0) {
                        pDb.setChoiceBasePriceCjm(choiceVoList.get(0).getDbfjTotalPrice().divide(diXiaShiArea, 2, RoundingMode.HALF_UP));
                    }
                }
                if (pDb.getFenXiType() == 17) {
                    pDb.setChoiceBasePriceC(choiceVoList.get(0).getDbsyTotalPrice());
                    if (choiceVoList.get(0).getDbsyTotalPrice() != null && shangYeArea.compareTo(BigDecimal.ZERO) != 0) {
                        pDb.setChoiceBasePriceCjm(choiceVoList.get(0).getDbsyTotalPrice().divide(shangYeArea, 2, RoundingMode.HALF_UP));
                    }
                }
                if (pDb.getFenXiType() == 18) {
                    pDb.setChoiceBasePriceC(choiceVoList.get(0).getDbcdzTotalPrice());
                    if (choiceVoList.get(0).getDbcdzTotalPrice() != null && diXiaShiArea.compareTo(BigDecimal.ZERO) != 0) {
                        pDb.setChoiceBasePriceCjm(choiceVoList.get(0).getDbcdzTotalPrice().divide(diXiaShiArea, 2, RoundingMode.HALF_UP));
                    }
                }
                if (pDb.getFenXiType() == 19) {
                    pDb.setChoiceBasePriceC(choiceVoList.get(0).getDbTotalPriceCount());
                    BigDecimal choiceBasePriceCjm = BigDecimal.ZERO;
                    if (choiceVoList.get(0).getDbzzTotalPrice() != null && zhuZhaiArea.compareTo(BigDecimal.ZERO) != 0) {
                        choiceBasePriceCjm = choiceBasePriceCjm.add(choiceVoList.get(0).getDbzzTotalPrice().divide(zhuZhaiArea, 2, RoundingMode.HALF_UP));
                    }
                    if (choiceVoList.get(0).getDbfjTotalPrice() != null && diXiaShiArea.compareTo(BigDecimal.ZERO) != 0) {
                        choiceBasePriceCjm = choiceBasePriceCjm.add(choiceVoList.get(0).getDbfjTotalPrice().divide(diXiaShiArea, 2, RoundingMode.HALF_UP));
                    }
                    if (choiceVoList.get(0).getDbsyTotalPrice() != null && shangYeArea.compareTo(BigDecimal.ZERO) != 0) {
                        choiceBasePriceCjm = choiceBasePriceCjm.add(choiceVoList.get(0).getDbsyTotalPrice().divide(shangYeArea, 2, RoundingMode.HALF_UP));
                    }
                    if (choiceVoList.get(0).getDbcdzTotalPrice() != null && diXiaShiArea.compareTo(BigDecimal.ZERO) != 0) {
                        choiceBasePriceCjm = choiceBasePriceCjm.add(choiceVoList.get(0).getDbcdzTotalPrice().divide(diXiaShiArea, 2, RoundingMode.HALF_UP));
                    }
                    pDb.setChoiceBasePriceCjm(choiceBasePriceCjm);
                }
                if (pDb.getFenXiType() == 20) {
                    pDb.setChoiceBasePriceC(choiceVoList.get(0).getDbxzzTotalPrice());
                    if (choiceVoList.get(0).getDbxzzTotalPrice() != null && zhuZhaiArea.compareTo(BigDecimal.ZERO) != 0) {
                        pDb.setChoiceBasePriceCjm(choiceVoList.get(0).getDbxzzTotalPrice().divide(zhuZhaiArea, 2, RoundingMode.HALF_UP));
                    }
                }
                if (pDb.getFenXiType() == 21) {
                    pDb.setChoiceBasePriceC(choiceVoList.get(0).getDbxfjTotalPrice());
                    if (choiceVoList.get(0).getDbxfjTotalPrice() != null && diXiaShiArea.compareTo(BigDecimal.ZERO) != 0) {
                        pDb.setChoiceBasePriceCjm(choiceVoList.get(0).getDbxfjTotalPrice().divide(diXiaShiArea, 2, RoundingMode.HALF_UP));
                    }
                }
                if (pDb.getFenXiType() == 22) {
                    pDb.setChoiceBasePriceC(choiceVoList.get(0).getDbxsyTotalPrice());
                    if (choiceVoList.get(0).getDbxsyTotalPrice() != null && shangYeArea.compareTo(BigDecimal.ZERO) != 0) {
                        pDb.setChoiceBasePriceCjm(choiceVoList.get(0).getDbxsyTotalPrice().divide(shangYeArea, 2, RoundingMode.HALF_UP));
                    }
                }
                if (pDb.getFenXiType() == 23) {
                    pDb.setChoiceBasePriceC(choiceVoList.get(0).getDbxcdzTotalPrice());
                    if (choiceVoList.get(0).getDbxcdzTotalPrice() != null && diXiaShiArea.compareTo(BigDecimal.ZERO) != 0) {
                        pDb.setChoiceBasePriceCjm(choiceVoList.get(0).getDbxcdzTotalPrice().divide(diXiaShiArea, 2, RoundingMode.HALF_UP));
                    }
                }
                if (pDb.getFenXiType() == 24) {
                    pDb.setChoiceBasePriceC(choiceVoList.get(0).getDbxTotalPriceCount());
                    BigDecimal choiceBasePriceCjm = BigDecimal.ZERO;
                    if (choiceVoList.get(0).getDbxzzTotalPrice() != null && zhuZhaiArea.compareTo(BigDecimal.ZERO) != 0) {
                        choiceBasePriceCjm = choiceBasePriceCjm.add(choiceVoList.get(0).getDbxzzTotalPrice().divide(zhuZhaiArea, 2, RoundingMode.HALF_UP));
                    }
                    if (choiceVoList.get(0).getDbxfjTotalPrice() != null && diXiaShiArea.compareTo(BigDecimal.ZERO) != 0) {
                        choiceBasePriceCjm = choiceBasePriceCjm.add(choiceVoList.get(0).getDbxfjTotalPrice().divide(diXiaShiArea, 2, RoundingMode.HALF_UP));
                    }
                    if (choiceVoList.get(0).getDbxsyTotalPrice() != null && shangYeArea.compareTo(BigDecimal.ZERO) != 0) {
                        choiceBasePriceCjm = choiceBasePriceCjm.add(choiceVoList.get(0).getDbxsyTotalPrice().divide(shangYeArea, 2, RoundingMode.HALF_UP));
                    }
                    if (choiceVoList.get(0).getDbxcdzTotalPrice() != null && diXiaShiArea.compareTo(BigDecimal.ZERO) != 0) {
                        choiceBasePriceCjm = choiceBasePriceCjm.add(choiceVoList.get(0).getDbxcdzTotalPrice().divide(diXiaShiArea, 2, RoundingMode.HALF_UP));
                    }
                    pDb.setChoiceBasePriceCjm(choiceBasePriceCjm);
                }
                if (pDb.getFenXiType() == 25) {
                    pDb.setChoiceBasePriceC(choiceVoList.get(0).getDydlzzTotalPrice());
                    if (choiceVoList.get(0).getDydlzzTotalPrice() != null && zhuZhaiArea.compareTo(BigDecimal.ZERO) != 0) {
                        pDb.setChoiceBasePriceCjm(choiceVoList.get(0).getDydlzzTotalPrice().divide(zhuZhaiArea, 2, RoundingMode.HALF_UP));
                    }
                }
                if (pDb.getFenXiType() == 26) {
                    pDb.setChoiceBasePriceC(choiceVoList.get(0).getDydlfjTotalPrice());
                    if (choiceVoList.get(0).getDydlfjTotalPrice() != null && diXiaShiArea.compareTo(BigDecimal.ZERO) != 0) {
                        pDb.setChoiceBasePriceCjm(choiceVoList.get(0).getDydlfjTotalPrice().divide(diXiaShiArea, 2, RoundingMode.HALF_UP));
                    }
                }
                if (pDb.getFenXiType() == 27) {
                    pDb.setChoiceBasePriceC(choiceVoList.get(0).getDydlsyTotalPrice());
                    if (choiceVoList.get(0).getDydlsyTotalPrice() != null && shangYeArea.compareTo(BigDecimal.ZERO) != 0) {
                        pDb.setChoiceBasePriceCjm(choiceVoList.get(0).getDydlsyTotalPrice().divide(shangYeArea, 2, RoundingMode.HALF_UP));
                    }
                }
                if (pDb.getFenXiType() == 28) {
                    pDb.setChoiceBasePriceC(choiceVoList.get(0).getDydlcdzTotalPrice());
                    if (choiceVoList.get(0).getDydlcdzTotalPrice() != null && diXiaShiArea.compareTo(BigDecimal.ZERO) != 0) {
                        pDb.setChoiceBasePriceCjm(choiceVoList.get(0).getDydlcdzTotalPrice().divide(diXiaShiArea, 2, RoundingMode.HALF_UP));
                    }
                }
                if (pDb.getFenXiType() == 29) {
                    pDb.setChoiceBasePriceC(choiceVoList.get(0).getDydlTotalPriceCount());
                    BigDecimal choiceBasePriceCjm = BigDecimal.ZERO;
                    if (choiceVoList.get(0).getDydlzzTotalPrice() != null && zhuZhaiArea.compareTo(BigDecimal.ZERO) != 0) {
                        choiceBasePriceCjm = choiceBasePriceCjm.add(choiceVoList.get(0).getDydlzzTotalPrice().divide(zhuZhaiArea, 2, RoundingMode.HALF_UP));
                    }
                    if (choiceVoList.get(0).getDydlfjTotalPrice() != null && diXiaShiArea.compareTo(BigDecimal.ZERO) != 0) {
                        choiceBasePriceCjm = choiceBasePriceCjm.add(choiceVoList.get(0).getDydlfjTotalPrice().divide(diXiaShiArea, 2, RoundingMode.HALF_UP));
                    }
                    if (choiceVoList.get(0).getDydlsyTotalPrice() != null && shangYeArea.compareTo(BigDecimal.ZERO) != 0) {
                        choiceBasePriceCjm = choiceBasePriceCjm.add(choiceVoList.get(0).getDydlsyTotalPrice().divide(shangYeArea, 2, RoundingMode.HALF_UP));
                    }
                    if (choiceVoList.get(0).getDydlcdzTotalPrice() != null && diXiaShiArea.compareTo(BigDecimal.ZERO) != 0) {
                        choiceBasePriceCjm = choiceBasePriceCjm.add(choiceVoList.get(0).getDydlcdzTotalPrice().divide(diXiaShiArea, 2, RoundingMode.HALF_UP));
                    }
                    pDb.setChoiceBasePriceCjm(choiceBasePriceCjm);

                }
                if (pDb.getFenXiType() == 30) {
                    pDb.setChoiceBasePriceC(choiceVoList.get(0).getMxcTotalPrice());
                    if (choiceVoList.get(0).getMxcTotalPrice() != null && zongArea.compareTo(BigDecimal.ZERO) != 0) {
                        pDb.setChoiceBasePriceCjm(choiceVoList.get(0).getMxcTotalPrice().divide(zongArea, 2, RoundingMode.HALF_UP));
                    }
                }
                if (pDb.getFenXiType() == 31) {
                    pDb.setChoiceBasePriceC(choiceVoList.get(0).getGydlTotalPrice());
                    if (choiceVoList.get(0).getGydlTotalPrice() != null && zongArea.compareTo(BigDecimal.ZERO) != 0) {
                        pDb.setChoiceBasePriceCjm(choiceVoList.get(0).getGydlTotalPrice().divide(zongArea, 2, RoundingMode.HALF_UP));
                    }
                }
                if (pDb.getFenXiType() == 32) {
                    pDb.setChoiceBasePriceC(choiceVoList.get(0).getPdxTotalPrice());
                    if (choiceVoList.get(0).getPdxTotalPrice() != null && zongArea.compareTo(BigDecimal.ZERO) != 0) {
                        pDb.setChoiceBasePriceCjm(choiceVoList.get(0).getPdxTotalPrice().divide(zongArea, 2, RoundingMode.HALF_UP));
                    }
                }
                if (pDb.getFenXiType() == 33) {
                    pDb.setChoiceBasePriceC(choiceVoList.get(0).getTsTotalPrice());
                    if (choiceVoList.get(0).getTsTotalPrice() != null && zongArea.compareTo(BigDecimal.ZERO) != 0) {
                        pDb.setChoiceBasePriceCjm(choiceVoList.get(0).getTsTotalPrice().divide(zongArea, 2, RoundingMode.HALF_UP));
                    }
                }
                if (pDb.getFenXiType() == 34) {
                    pDb.setChoiceBasePriceC(choiceVoList.get(0).getSxfTotalPrice());
                    if (choiceVoList.get(0).getSxfTotalPrice() != null && zongArea.compareTo(BigDecimal.ZERO) != 0) {
                        pDb.setChoiceBasePriceCjm(choiceVoList.get(0).getSxfTotalPrice().divide(zongArea, 2, RoundingMode.HALF_UP));
                    }
                }
                if (pDb.getFenXiType() == 35) {
                    pDb.setChoiceBasePriceC(choiceVoList.get(0).getQtTotalPrice());
                    if (choiceVoList.get(0).getQtTotalPrice() != null && zongArea.compareTo(BigDecimal.ZERO) != 0) {
                        pDb.setChoiceBasePriceCjm(choiceVoList.get(0).getQtTotalPrice().divide(zongArea, 2, RoundingMode.HALF_UP));
                    }
                }
            }
            for (PrecipitateDb p : sValue) {
                if (p.getBasePriceAjm() != null && p.getDingBiaoPriceBjm() != null) {
                    p.setBaPriceJm(p.getDingBiaoPriceBjm().subtract(p.getBasePriceAjm()));
                }
                if (p.getChoiceBasePriceCjm() != null && p.getDingBiaoPriceBjm() != null) {
                    p.setBcPriceJm(p.getDingBiaoPriceBjm().subtract(p.getChoiceBasePriceCjm()));
                }
            }
            precipitateDbService.save(sValue);
        }

    }


    /**
     * 将FeXiExtractingVo的数据行转列存储到PrecipitateDb表中
     *
     * @param project
     * @param sValue
     * @param bdItemVo
     * @param choiceItemVo
     * @return
     */
    public List<PrecipitateDb> rowToColumnDb(Project project, List<FeXiExtractingVo> sValue, FeXiExtractingVo bdItemVo, FeXiExtractingVo choiceItemVo) {
        List<PrecipitateDb> precipitateDbList = new ArrayList<>();
        BigDecimal zongArea = new BigDecimal(project.getZongArea().toString());
        BigDecimal zhuZhaiArea = new BigDecimal(project.getZhuZhaiArea().toString());
        BigDecimal diXiaShiArea = new BigDecimal(project.getDiXiaShiArea().toString());
        BigDecimal shangYeArea = new BigDecimal(project.getShangYeArea().toString());
        //35个沉淀分析计算、保存
        for (int i = 0; i < 35; i++) {
            PrecipitateDb precipitateDb = new PrecipitateDb();
            precipitateDb.setProject(project);
            precipitateDb.setSupplyCompany(sValue.get(0).getSupplyCompany());
            precipitateDb.setFenXiType(i + 1);
            if (i == 0) {
                if (bdItemVo != null && bdItemVo.getSupplyCompany() == null && bdItemVo.getJieDuan() == 1) {
                    precipitateDb.setBasePriceA(bdItemVo.getOuterZdf());
                }
                if (choiceItemVo != null && choiceItemVo.getSupplyCompany() != null) {
                    precipitateDb.setChoiceBasePriceC(choiceItemVo.getOuterZdf());
                }
                for (FeXiExtractingVo tempVo : sValue) {
                    if (tempVo.getSupplyCompany() != null && tempVo.getJieDuan() == 6) {
                        precipitateDb.setDingBiaoPriceB(tempVo.getOuterZdf());
                    } else if (tempVo.getSupplyCompany() != null && tempVo.getJieDuan() == 8) {
                    }
                }
            }
            if (i == 1) {
                if (bdItemVo != null && bdItemVo.getSupplyCompany() == null && bdItemVo.getJieDuan() == 1) {
                    precipitateDb.setBasePriceA(bdItemVo.getInnerZdf());
                    if (zongArea.compareTo(BigDecimal.ZERO) != 0) {
                        precipitateDb.setBasePriceAjm(bdItemVo.getInnerZdf().divide(zongArea, 2, RoundingMode.HALF_UP));
                    }
                }
                if (choiceItemVo != null && choiceItemVo.getSupplyCompany() != null) {
                    precipitateDb.setChoiceBasePriceC(choiceItemVo.getInnerZdf());
                    if (new BigDecimal(choiceItemVo.getProject().getZongArea().toString()).compareTo(BigDecimal.ZERO) != 0) {
                        precipitateDb.setChoiceBasePriceCjm(choiceItemVo.getInnerZdf().divide(new BigDecimal(choiceItemVo.getProject().getZongArea().toString()), 2, RoundingMode.HALF_UP));
                    }
                }
                for (FeXiExtractingVo tempVo : sValue) {
                    if (tempVo.getSupplyCompany() != null && tempVo.getJieDuan() == 6) {
                        precipitateDb.setDingBiaoPriceB(tempVo.getInnerZdf());
                        if (zongArea.compareTo(BigDecimal.ZERO) != 0) {
                            precipitateDb.setDingBiaoPriceBjm(tempVo.getInnerZdf().divide(zongArea, 2, RoundingMode.HALF_UP));
                        }
                    }
                }
            }
            //内线合同负荷单方--在页面填写
            if (i == 2) {
                if (bdItemVo != null && bdItemVo.getSupplyCompany() == null && bdItemVo.getJieDuan() == 1) {
//                            precipitateDb.setBasePriceA();
//                            precipitateDb.setBasePriceAjm();
                }
                if (choiceItemVo != null && choiceItemVo.getSupplyCompany() != null) {
//                            precipitateDb.setSsBasePriceC();
//                            precipitateDb.setSsBasePriceCjm();
                }
                for (FeXiExtractingVo tempVo : sValue) {
                    if (tempVo.getSupplyCompany() != null && tempVo.getJieDuan() == 6) {
//                            precipitateDb.setDingBiaoPriceB();
//                            precipitateDb.setDingBiaoPriceBjm();
                    } else if (tempVo.getSupplyCompany() != null && tempVo.getJieDuan() == 8) {
//                            precipitateDb.setSsDingBiaoPriceD(tempVo.get);
//                            precipitateDb.setSsDingBiaoPriceDjm();
                    }
                }
            }
            if (i == 3) {
                if (bdItemVo != null && bdItemVo.getSupplyCompany() == null && bdItemVo.getJieDuan() == 1) {
                    precipitateDb.setBasePriceA(bdItemVo.getGygTotalPrice());
                    if (zongArea.compareTo(BigDecimal.ZERO) != 0) {
                        precipitateDb.setBasePriceAjm(bdItemVo.getGygTotalPrice().divide(zongArea, 2, RoundingMode.HALF_UP));
                    }
                }
                if (choiceItemVo != null && choiceItemVo.getSupplyCompany() != null) {
                    precipitateDb.setChoiceBasePriceC(choiceItemVo.getGygTotalPrice());
                    if (new BigDecimal(choiceItemVo.getProject().getZongArea().toString()).compareTo(BigDecimal.ZERO) != 0) {
                        precipitateDb.setChoiceBasePriceCjm(choiceItemVo.getGygTotalPrice().divide(new BigDecimal(choiceItemVo.getProject().getZongArea().toString()), 2, RoundingMode.HALF_UP));
                    }
                }
                for (FeXiExtractingVo tempVo : sValue) {
                    if (tempVo.getSupplyCompany() != null && tempVo.getJieDuan() == 6) {
                        precipitateDb.setDingBiaoPriceB(tempVo.getGygTotalPrice());
                        if (zongArea.compareTo(BigDecimal.ZERO) != 0) {
                            precipitateDb.setDingBiaoPriceBjm(tempVo.getGygTotalPrice().divide(zongArea, 2, RoundingMode.HALF_UP));
                        }
                    }
                }
            }
            if (i == 4) {
                if (bdItemVo != null && bdItemVo.getSupplyCompany() == null && bdItemVo.getJieDuan() == 1) {
                    precipitateDb.setBasePriceA(bdItemVo.getDygzzTotalPrice());
                    if (zhuZhaiArea.compareTo(BigDecimal.ZERO) != 0) {
                        precipitateDb.setBasePriceAjm(bdItemVo.getDygzzTotalPrice().divide(zhuZhaiArea, 2, RoundingMode.HALF_UP));
                    }
                }
                if (choiceItemVo != null && choiceItemVo.getSupplyCompany() != null) {
                    precipitateDb.setChoiceBasePriceC(choiceItemVo.getDygzzTotalPrice());
                    if (new BigDecimal(choiceItemVo.getProject().getZhuZhaiArea().toString()).compareTo(BigDecimal.ZERO) != 0) {
                        precipitateDb.setChoiceBasePriceCjm(choiceItemVo.getDygzzTotalPrice().divide(new BigDecimal(choiceItemVo.getProject().getZhuZhaiArea().toString()), 2, RoundingMode.HALF_UP));
                    }
                }
                for (FeXiExtractingVo tempVo : sValue) {
                    if (tempVo.getSupplyCompany() != null && tempVo.getJieDuan() == 6) {
                        precipitateDb.setDingBiaoPriceB(tempVo.getDygzzTotalPrice());
                        if (zhuZhaiArea.compareTo(BigDecimal.ZERO) != 0) {
                            precipitateDb.setDingBiaoPriceBjm(tempVo.getDygzzTotalPrice().divide(zhuZhaiArea, 2, RoundingMode.HALF_UP));
                        }
                    }
                }
            }
            if (i == 5) {
                if (bdItemVo != null && bdItemVo.getSupplyCompany() == null && bdItemVo.getJieDuan() == 1) {
                    precipitateDb.setBasePriceA(bdItemVo.getDygfjTotalPrice());
                    if (diXiaShiArea.compareTo(BigDecimal.ZERO) != 0) {
                        precipitateDb.setBasePriceAjm(bdItemVo.getDygfjTotalPrice().divide(diXiaShiArea, 2, RoundingMode.HALF_UP));
                    }
                }
                if (choiceItemVo != null && choiceItemVo.getSupplyCompany() != null) {
                    precipitateDb.setChoiceBasePriceC(choiceItemVo.getDygfjTotalPrice());
                    if (diXiaShiArea.compareTo(BigDecimal.ZERO) != 0) {
                        precipitateDb.setChoiceBasePriceCjm(choiceItemVo.getDygfjTotalPrice().divide(diXiaShiArea, 2, RoundingMode.HALF_UP));
                    }
                }
                for (FeXiExtractingVo tempVo : sValue) {
                    if (tempVo.getSupplyCompany() != null && tempVo.getJieDuan() == 6) {
                        precipitateDb.setDingBiaoPriceB(tempVo.getDygfjTotalPrice());
                        if (diXiaShiArea.compareTo(BigDecimal.ZERO) != 0) {
                            precipitateDb.setDingBiaoPriceBjm(tempVo.getDygfjTotalPrice().divide(diXiaShiArea, 2, RoundingMode.HALF_UP));
                        }
                    }
                }
            }
            if (i == 6) {
                if (bdItemVo != null && bdItemVo.getSupplyCompany() == null && bdItemVo.getJieDuan() == 1) {
                    precipitateDb.setBasePriceA(bdItemVo.getDygsyTotalPrice());
                    if (shangYeArea.compareTo(BigDecimal.ZERO) != 0) {
                        precipitateDb.setBasePriceAjm(bdItemVo.getDygsyTotalPrice().divide(shangYeArea, 2, RoundingMode.HALF_UP));
                    }
                }
                if (choiceItemVo != null && choiceItemVo.getSupplyCompany() != null) {
                    precipitateDb.setChoiceBasePriceC(choiceItemVo.getDygsyTotalPrice());
                    if (new BigDecimal(choiceItemVo.getProject().getShangYeArea().toString()).compareTo(BigDecimal.ZERO) != 0) {
                        precipitateDb.setChoiceBasePriceCjm(choiceItemVo.getDygsyTotalPrice().divide(new BigDecimal(choiceItemVo.getProject().getShangYeArea().toString()), 2, RoundingMode.HALF_UP));
                    }
                }
                for (FeXiExtractingVo tempVo : sValue) {
                    if (tempVo.getSupplyCompany() != null && tempVo.getJieDuan() == 6) {
                        precipitateDb.setDingBiaoPriceB(tempVo.getDygsyTotalPrice());
                        if (shangYeArea.compareTo(BigDecimal.ZERO) != 0) {
                            precipitateDb.setDingBiaoPriceBjm(tempVo.getDygsyTotalPrice().divide(shangYeArea, 2, RoundingMode.HALF_UP));
                        }
                    }
                }
            }
            if (i == 7) {
                if (bdItemVo != null && bdItemVo.getSupplyCompany() == null && bdItemVo.getJieDuan() == 1) {
                    precipitateDb.setBasePriceA(bdItemVo.getDygcdzTotalPrice());
                    if (diXiaShiArea.compareTo(BigDecimal.ZERO) != 0) {
                        precipitateDb.setBasePriceAjm(bdItemVo.getDygcdzTotalPrice().divide(diXiaShiArea, 2, RoundingMode.HALF_UP));
                    }
                }
                if (choiceItemVo != null && choiceItemVo.getSupplyCompany() != null) {
                    precipitateDb.setChoiceBasePriceC(choiceItemVo.getDygcdzTotalPrice());
                    if (new BigDecimal(choiceItemVo.getProject().getDiXiaShiArea().toString()).compareTo(BigDecimal.ZERO) != 0) {
                        precipitateDb.setChoiceBasePriceCjm(choiceItemVo.getDygcdzTotalPrice().divide(new BigDecimal(choiceItemVo.getProject().getDiXiaShiArea().toString()), 2, RoundingMode.HALF_UP));
                    }
                }
                for (FeXiExtractingVo tempVo : sValue) {
                    if (tempVo.getSupplyCompany() != null && tempVo.getJieDuan() == 6) {
                        precipitateDb.setDingBiaoPriceB(tempVo.getDygcdzTotalPrice());
                        if (diXiaShiArea.compareTo(BigDecimal.ZERO) != 0) {
                            precipitateDb.setDingBiaoPriceBjm(tempVo.getDygcdzTotalPrice().divide(diXiaShiArea, 2, RoundingMode.HALF_UP));
                        }
                    }
                }
            }
            if (i == 8) {
                if (bdItemVo != null && bdItemVo.getSupplyCompany() == null && bdItemVo.getJieDuan() == 1) {
                    precipitateDb.setBasePriceA(bdItemVo.getDygTotalPriceCount());
                    BigDecimal tempDygzzTotalPrice = BigDecimal.ZERO;
                    BigDecimal tempDygfjTotalPrice = BigDecimal.ZERO;
                    BigDecimal tempDygsyTotalPrice = BigDecimal.ZERO;
                    BigDecimal tempDygcdzTotalPrice = BigDecimal.ZERO;
                    if (zhuZhaiArea.compareTo(BigDecimal.ZERO) != 0) {
                        tempDygzzTotalPrice = bdItemVo.getDygzzTotalPrice().divide(zhuZhaiArea, 2, RoundingMode.HALF_UP);
                    }
                    if (diXiaShiArea.compareTo(BigDecimal.ZERO) != 0) {
                        tempDygfjTotalPrice = bdItemVo.getDygfjTotalPrice().divide(diXiaShiArea, 2, RoundingMode.HALF_UP);
                        tempDygcdzTotalPrice = bdItemVo.getDygcdzTotalPrice().divide(diXiaShiArea, 2, RoundingMode.HALF_UP);
                    }
                    if (shangYeArea.compareTo(BigDecimal.ZERO) != 0) {
                        tempDygsyTotalPrice = bdItemVo.getDygsyTotalPrice().divide(shangYeArea, 2, RoundingMode.HALF_UP);
                    }
                    precipitateDb.setDingBiaoPriceBjm(tempDygzzTotalPrice.add(tempDygfjTotalPrice).add(tempDygsyTotalPrice).add(tempDygcdzTotalPrice));
                }
                if (choiceItemVo != null && choiceItemVo.getSupplyCompany() != null) {
                    precipitateDb.setChoiceBasePriceC(choiceItemVo.getDygTotalPriceCount());
                    BigDecimal tempDygzzTotalPrice = BigDecimal.ZERO;
                    BigDecimal tempDygfjTotalPrice = BigDecimal.ZERO;
                    BigDecimal tempDygsyTotalPrice = BigDecimal.ZERO;
                    BigDecimal tempDygcdzTotalPrice = BigDecimal.ZERO;
                    if (new BigDecimal(choiceItemVo.getProject().getZhuZhaiArea().toString()).compareTo(BigDecimal.ZERO) != 0) {
                        tempDygzzTotalPrice = choiceItemVo.getDygzzTotalPrice().divide(new BigDecimal(choiceItemVo.getProject().getZhuZhaiArea().toString()), 2, RoundingMode.HALF_UP);
                    }
                    if (new BigDecimal(choiceItemVo.getProject().getDiXiaShiArea().toString()).compareTo(BigDecimal.ZERO) != 0) {
                        tempDygfjTotalPrice = choiceItemVo.getDygfjTotalPrice().divide(new BigDecimal(choiceItemVo.getProject().getDiXiaShiArea().toString()), 2, RoundingMode.HALF_UP);
                        tempDygcdzTotalPrice = choiceItemVo.getDygcdzTotalPrice().divide(new BigDecimal(choiceItemVo.getProject().getDiXiaShiArea().toString()), 2, RoundingMode.HALF_UP);
                    }
                    if (new BigDecimal(choiceItemVo.getProject().getShangYeArea().toString()).compareTo(BigDecimal.ZERO) != 0) {
                        tempDygsyTotalPrice = choiceItemVo.getDygsyTotalPrice().divide(new BigDecimal(choiceItemVo.getProject().getShangYeArea().toString()), 2, RoundingMode.HALF_UP);
                    }
                    precipitateDb.setChoiceBasePriceCjm(tempDygzzTotalPrice.add(tempDygfjTotalPrice).add(tempDygsyTotalPrice).add(tempDygcdzTotalPrice));
                }
                for (FeXiExtractingVo tempVo : sValue) {
                    if (tempVo.getSupplyCompany() != null && tempVo.getJieDuan() == 6) {
                        precipitateDb.setDingBiaoPriceB(tempVo.getDygTotalPriceCount());
                        BigDecimal tempDygzzTotalPrice = BigDecimal.ZERO;
                        BigDecimal tempDygfjTotalPrice = BigDecimal.ZERO;
                        BigDecimal tempDygsyTotalPrice = BigDecimal.ZERO;
                        BigDecimal tempDygcdzTotalPrice = BigDecimal.ZERO;
                        if (zhuZhaiArea.compareTo(BigDecimal.ZERO) != 0) {
                            tempDygzzTotalPrice = tempVo.getDygzzTotalPrice().divide(zhuZhaiArea, 2, RoundingMode.HALF_UP);
                        }
                        if (diXiaShiArea.compareTo(BigDecimal.ZERO) != 0) {
                            tempDygfjTotalPrice = tempVo.getDygfjTotalPrice().divide(diXiaShiArea, 2, RoundingMode.HALF_UP);
                            tempDygcdzTotalPrice = tempVo.getDygcdzTotalPrice().divide(diXiaShiArea, 2, RoundingMode.HALF_UP);
                        }
                        if (shangYeArea.compareTo(BigDecimal.ZERO) != 0) {
                            tempDygsyTotalPrice = tempVo.getDygsyTotalPrice().divide(shangYeArea, 2, RoundingMode.HALF_UP);
                        }
                        precipitateDb.setDingBiaoPriceBjm(tempDygzzTotalPrice.add(tempDygfjTotalPrice).add(tempDygsyTotalPrice).add(tempDygcdzTotalPrice));
                    }
                }
            }
            if (i == 9) {
                if (bdItemVo != null && bdItemVo.getSupplyCompany() == null && bdItemVo.getJieDuan() == 1) {
                    precipitateDb.setBasePriceA(bdItemVo.getByqzzTotalPrice());
                    if (zhuZhaiArea.compareTo(BigDecimal.ZERO) != 0) {
                        precipitateDb.setBasePriceAjm(bdItemVo.getByqzzTotalPrice().divide(zhuZhaiArea, 2, RoundingMode.HALF_UP));
                    }
                }
                if (choiceItemVo != null && choiceItemVo.getSupplyCompany() != null) {
                    precipitateDb.setChoiceBasePriceC(choiceItemVo.getByqzzTotalPrice());
                    if (new BigDecimal(choiceItemVo.getProject().getZhuZhaiArea().toString()).compareTo(BigDecimal.ZERO) != 0) {
                        precipitateDb.setChoiceBasePriceCjm(choiceItemVo.getByqzzTotalPrice().divide(new BigDecimal(choiceItemVo.getProject().getZhuZhaiArea().toString()), 2, RoundingMode.HALF_UP));
                    }
                }
                for (FeXiExtractingVo tempVo : sValue) {
                    if (tempVo.getSupplyCompany() != null && tempVo.getJieDuan() == 6) {
                        precipitateDb.setDingBiaoPriceB(tempVo.getByqzzTotalPrice());
                        if (zhuZhaiArea.compareTo(BigDecimal.ZERO) != 0) {
                            precipitateDb.setDingBiaoPriceBjm(tempVo.getByqzzTotalPrice().divide(zhuZhaiArea, 2, RoundingMode.HALF_UP));
                        }
                    }
                }
            }
            if (i == 10) {
                if (bdItemVo != null && bdItemVo.getSupplyCompany() == null && bdItemVo.getJieDuan() == 1) {
                    precipitateDb.setBasePriceA(bdItemVo.getByqfjTotalPrice());
                    if (diXiaShiArea.compareTo(BigDecimal.ZERO) != 0) {
                        precipitateDb.setBasePriceAjm(bdItemVo.getByqfjTotalPrice().divide(diXiaShiArea, 2, RoundingMode.HALF_UP));
                    }
                }
                if (choiceItemVo != null && choiceItemVo.getSupplyCompany() != null) {
                    precipitateDb.setChoiceBasePriceC(choiceItemVo.getByqfjTotalPrice());
                    if (new BigDecimal(choiceItemVo.getProject().getDiXiaShiArea().toString()).compareTo(BigDecimal.ZERO) != 0) {
                        precipitateDb.setChoiceBasePriceCjm(choiceItemVo.getByqfjTotalPrice().divide(new BigDecimal(choiceItemVo.getProject().getDiXiaShiArea().toString()), 2, RoundingMode.HALF_UP));
                    }
                }
                for (FeXiExtractingVo tempVo : sValue) {
                    if (tempVo.getSupplyCompany() != null && tempVo.getJieDuan() == 6) {
                        precipitateDb.setDingBiaoPriceB(tempVo.getByqfjTotalPrice());
                        if (diXiaShiArea.compareTo(BigDecimal.ZERO) != 0) {
                            precipitateDb.setDingBiaoPriceBjm(tempVo.getByqfjTotalPrice().divide(diXiaShiArea, 2, RoundingMode.HALF_UP));
                        }
                    }
                }
            }
            if (i == 11) {
                if (bdItemVo != null && bdItemVo.getSupplyCompany() == null && bdItemVo.getJieDuan() == 1) {
                    precipitateDb.setBasePriceA(bdItemVo.getByqsyTotalPrice());
                    if (shangYeArea.compareTo(BigDecimal.ZERO) != 0) {
                        precipitateDb.setBasePriceAjm(bdItemVo.getByqsyTotalPrice().divide(shangYeArea, 2, RoundingMode.HALF_UP));
                    }
                }
                if (choiceItemVo != null && choiceItemVo.getSupplyCompany() != null) {
                    precipitateDb.setChoiceBasePriceC(choiceItemVo.getByqsyTotalPrice());
                    if ((new BigDecimal(choiceItemVo.getProject().getShangYeArea().toString()).compareTo(BigDecimal.ZERO) != 0)) {
                        precipitateDb.setChoiceBasePriceCjm(choiceItemVo.getByqsyTotalPrice().divide(new BigDecimal(choiceItemVo.getProject().getShangYeArea().toString()), 2, RoundingMode.HALF_UP));
                    }
                }
                for (FeXiExtractingVo tempVo : sValue) {
                    if (tempVo.getSupplyCompany() != null && tempVo.getJieDuan() == 6) {
                        precipitateDb.setDingBiaoPriceB(tempVo.getByqsyTotalPrice());
                        if (shangYeArea.compareTo(BigDecimal.ZERO) != 0) {
                            precipitateDb.setDingBiaoPriceBjm(tempVo.getByqsyTotalPrice().divide(shangYeArea, 2, RoundingMode.HALF_UP));
                        }
                    }
                }
            }
            if (i == 12) {
                if (bdItemVo != null && bdItemVo.getSupplyCompany() == null && bdItemVo.getJieDuan() == 1) {
                    precipitateDb.setBasePriceA(bdItemVo.getByqcdzTotalPrice());
                    if (diXiaShiArea.compareTo(BigDecimal.ZERO) != 0) {
                        precipitateDb.setBasePriceAjm(bdItemVo.getByqcdzTotalPrice().divide(diXiaShiArea, 2, RoundingMode.HALF_UP));
                    }
                }
                if (choiceItemVo != null && choiceItemVo.getSupplyCompany() != null) {
                    precipitateDb.setChoiceBasePriceC(choiceItemVo.getByqcdzTotalPrice());
                    if (new BigDecimal(choiceItemVo.getProject().getDiXiaShiArea().toString()).compareTo(BigDecimal.ZERO) != 0) {
                        precipitateDb.setChoiceBasePriceCjm(choiceItemVo.getByqcdzTotalPrice().divide(new BigDecimal(choiceItemVo.getProject().getDiXiaShiArea().toString()), 2, RoundingMode.HALF_UP));
                    }
                }
                for (FeXiExtractingVo tempVo : sValue) {
                    if (tempVo.getSupplyCompany() != null && tempVo.getJieDuan() == 6) {
                        precipitateDb.setDingBiaoPriceB(tempVo.getByqcdzTotalPrice());
                        if (diXiaShiArea.compareTo(BigDecimal.ZERO) != 0) {
                            precipitateDb.setDingBiaoPriceBjm(tempVo.getByqcdzTotalPrice().divide(diXiaShiArea, 2, RoundingMode.HALF_UP));
                        }
                    }
                }
            }
            if (i == 13) {
                if (bdItemVo != null && bdItemVo.getSupplyCompany() == null && bdItemVo.getJieDuan() == 1) {
                    precipitateDb.setBasePriceA(bdItemVo.getByqTotalPriceCount());
                    BigDecimal tempByqzzTotalPrice = BigDecimal.ZERO;
                    BigDecimal tempByqfjTotalPrice = BigDecimal.ZERO;
                    BigDecimal tempByqsyTotalPrice = BigDecimal.ZERO;
                    BigDecimal tempByqcdzTotalPrice = BigDecimal.ZERO;
                    if (zhuZhaiArea.compareTo(BigDecimal.ZERO) != 0) {
                        tempByqzzTotalPrice = bdItemVo.getByqzzTotalPrice().divide(zhuZhaiArea, 2, RoundingMode.HALF_UP);
                    }
                    if (diXiaShiArea.compareTo(BigDecimal.ZERO) != 0) {
                        tempByqfjTotalPrice = bdItemVo.getByqfjTotalPrice().divide(diXiaShiArea, 2, RoundingMode.HALF_UP);
                        tempByqcdzTotalPrice = bdItemVo.getByqcdzTotalPrice().divide(diXiaShiArea, 2, RoundingMode.HALF_UP);
                    }
                    if (shangYeArea.compareTo(BigDecimal.ZERO) != 0) {
                        tempByqsyTotalPrice = bdItemVo.getByqsyTotalPrice().divide(shangYeArea, 2, RoundingMode.HALF_UP);
                    }
                    precipitateDb.setBasePriceAjm(tempByqzzTotalPrice.add(tempByqfjTotalPrice).add(tempByqsyTotalPrice).add(tempByqcdzTotalPrice));
                }
                if (choiceItemVo != null && choiceItemVo.getSupplyCompany() != null) {
                    precipitateDb.setChoiceBasePriceC(choiceItemVo.getByqTotalPriceCount());
                    BigDecimal tempByqzzTotalPrice = BigDecimal.ZERO;
                    BigDecimal tempByqfjTotalPrice = BigDecimal.ZERO;
                    BigDecimal tempByqsyTotalPrice = BigDecimal.ZERO;
                    BigDecimal tempByqcdzTotalPrice = BigDecimal.ZERO;
                    if (new BigDecimal(choiceItemVo.getProject().getZhuZhaiArea().toString()).compareTo(BigDecimal.ZERO) != 0) {
                        tempByqzzTotalPrice = choiceItemVo.getByqzzTotalPrice().divide(new BigDecimal(choiceItemVo.getProject().getZhuZhaiArea().toString()), 2, RoundingMode.HALF_UP);
                    }
                    if (new BigDecimal(choiceItemVo.getProject().getDiXiaShiArea().toString()).compareTo(BigDecimal.ZERO) != 0) {
                        tempByqfjTotalPrice = choiceItemVo.getByqfjTotalPrice().divide(new BigDecimal(choiceItemVo.getProject().getDiXiaShiArea().toString()), 2, RoundingMode.HALF_UP);
                        tempByqcdzTotalPrice = choiceItemVo.getByqsyTotalPrice().divide(new BigDecimal(choiceItemVo.getProject().getShangYeArea().toString()), 2, RoundingMode.HALF_UP);
                    }
                    if (new BigDecimal(choiceItemVo.getProject().getShangYeArea().toString()).compareTo(BigDecimal.ZERO) != 0) {
                        tempByqsyTotalPrice = choiceItemVo.getByqsyTotalPrice().divide(new BigDecimal(choiceItemVo.getProject().getShangYeArea().toString()), 2, RoundingMode.HALF_UP);
                    }
                    precipitateDb.setChoiceBasePriceCjm(tempByqzzTotalPrice.add(tempByqfjTotalPrice).add(tempByqsyTotalPrice).add(tempByqcdzTotalPrice));
                }
                for (FeXiExtractingVo tempVo : sValue) {
                    if (tempVo.getSupplyCompany() != null && tempVo.getJieDuan() == 6) {
                        precipitateDb.setDingBiaoPriceB(tempVo.getByqTotalPriceCount());
                        BigDecimal tempByqzzTotalPrice = BigDecimal.ZERO;
                        BigDecimal tempByqfjTotalPrice = BigDecimal.ZERO;
                        BigDecimal tempByqsyTotalPrice = BigDecimal.ZERO;
                        BigDecimal tempByqcdzTotalPrice = BigDecimal.ZERO;
                        if (zhuZhaiArea.compareTo(BigDecimal.ZERO) != 0) {
                            tempByqzzTotalPrice = tempVo.getByqzzTotalPrice().divide(zhuZhaiArea, 2, RoundingMode.HALF_UP);
                        }
                        if (diXiaShiArea.compareTo(BigDecimal.ZERO) != 0) {
                            tempByqfjTotalPrice = tempVo.getByqfjTotalPrice().divide(diXiaShiArea, 2, RoundingMode.HALF_UP);
                            tempByqcdzTotalPrice = tempVo.getByqcdzTotalPrice().divide(diXiaShiArea, 2, RoundingMode.HALF_UP);
                        }
                        if (shangYeArea.compareTo(BigDecimal.ZERO) != 0) {
                            tempByqsyTotalPrice = tempVo.getByqsyTotalPrice().divide(shangYeArea, 2, RoundingMode.HALF_UP);
                        }
                        precipitateDb.setDingBiaoPriceBjm(tempByqzzTotalPrice.add(tempByqfjTotalPrice).add(tempByqsyTotalPrice).add(tempByqcdzTotalPrice));
                    }
                }
            }
            if (i == 14) {
                if (bdItemVo != null && bdItemVo.getSupplyCompany() == null && bdItemVo.getJieDuan() == 1) {
                    precipitateDb.setBasePriceA(bdItemVo.getDbzzTotalPrice());
                    if (zhuZhaiArea.compareTo(BigDecimal.ZERO) != 0) {
                        precipitateDb.setBasePriceAjm(bdItemVo.getDbzzTotalPrice().divide(zhuZhaiArea, 2, RoundingMode.HALF_UP));
                    }
                }
                if (choiceItemVo != null && choiceItemVo.getSupplyCompany() != null) {
                    precipitateDb.setChoiceBasePriceC(choiceItemVo.getDbzzTotalPrice());
                    if (new BigDecimal(choiceItemVo.getProject().getZhuZhaiArea().toString()).compareTo(BigDecimal.ZERO) != 0) {
                        precipitateDb.setChoiceBasePriceCjm(choiceItemVo.getDbzzTotalPrice().divide(new BigDecimal(choiceItemVo.getProject().getZhuZhaiArea().toString()), 2, RoundingMode.HALF_UP));
                    }
                }
                for (FeXiExtractingVo tempVo : sValue) {
                    if (tempVo.getSupplyCompany() != null && tempVo.getJieDuan() == 6) {
                        precipitateDb.setDingBiaoPriceB(tempVo.getDbzzTotalPrice());
                        if (zhuZhaiArea.compareTo(BigDecimal.ZERO) != 0) {
                            precipitateDb.setDingBiaoPriceBjm(tempVo.getDbzzTotalPrice().divide(zhuZhaiArea, 2, RoundingMode.HALF_UP));
                        }
                    }
                }
            }
            if (i == 15) {
                if (bdItemVo != null && bdItemVo.getSupplyCompany() == null && bdItemVo.getJieDuan() == 1) {
                    precipitateDb.setBasePriceA(bdItemVo.getDbfjTotalPrice());
                    if (diXiaShiArea.compareTo(BigDecimal.ZERO) != 0) {
                        precipitateDb.setBasePriceAjm(bdItemVo.getDbfjTotalPrice().divide(diXiaShiArea, 2, RoundingMode.HALF_UP));
                    }
                }
                if (choiceItemVo != null && choiceItemVo.getSupplyCompany() != null) {
                    precipitateDb.setChoiceBasePriceC(choiceItemVo.getDbfjTotalPrice());
                    if (new BigDecimal(choiceItemVo.getProject().getDiXiaShiArea().toString()).compareTo(BigDecimal.ZERO) != 0) {
                        precipitateDb.setChoiceBasePriceCjm(choiceItemVo.getDbfjTotalPrice().divide(new BigDecimal(choiceItemVo.getProject().getDiXiaShiArea().toString()), 2, RoundingMode.HALF_UP));
                    }
                }
                for (FeXiExtractingVo tempVo : sValue) {
                    if (tempVo.getSupplyCompany() != null && tempVo.getJieDuan() == 6) {
                        precipitateDb.setDingBiaoPriceB(tempVo.getDbfjTotalPrice());
                        if (diXiaShiArea.compareTo(BigDecimal.ZERO) != 0) {
                            precipitateDb.setDingBiaoPriceBjm(tempVo.getDbfjTotalPrice().divide(diXiaShiArea, 2, RoundingMode.HALF_UP));
                        }
                    }
                }
            }
            if (i == 16) {
                if (bdItemVo != null && bdItemVo.getSupplyCompany() == null && bdItemVo.getJieDuan() == 1) {
                    precipitateDb.setBasePriceA(bdItemVo.getDbsyTotalPrice());
                    if (shangYeArea.compareTo(BigDecimal.ZERO) != 0) {
                        precipitateDb.setBasePriceAjm(bdItemVo.getDbsyTotalPrice().divide(shangYeArea, 2, RoundingMode.HALF_UP));
                    }
                }
                if (choiceItemVo != null && choiceItemVo.getSupplyCompany() != null) {
                    precipitateDb.setChoiceBasePriceC(choiceItemVo.getDbsyTotalPrice());
                    if (new BigDecimal(choiceItemVo.getProject().getShangYeArea().toString()).compareTo(BigDecimal.ZERO) != 0) {
                        precipitateDb.setChoiceBasePriceCjm(choiceItemVo.getDbsyTotalPrice().divide(new BigDecimal(choiceItemVo.getProject().getShangYeArea().toString()), 2, RoundingMode.HALF_UP));
                    }
                }
                for (FeXiExtractingVo tempVo : sValue) {
                    if (tempVo.getSupplyCompany() != null && tempVo.getJieDuan() == 6) {
                        precipitateDb.setDingBiaoPriceB(tempVo.getDbsyTotalPrice());
                        if (shangYeArea.compareTo(BigDecimal.ZERO) != 0) {
                            precipitateDb.setDingBiaoPriceBjm(tempVo.getDbsyTotalPrice().divide(shangYeArea, 2, RoundingMode.HALF_UP));
                        }
                    }
                }
            }
            if (i == 17) {
                if (bdItemVo != null && bdItemVo.getSupplyCompany() == null && bdItemVo.getJieDuan() == 1) {
                    precipitateDb.setBasePriceA(bdItemVo.getDbcdzTotalPrice());
                    if (diXiaShiArea.compareTo(BigDecimal.ZERO) != 0) {
                        precipitateDb.setBasePriceAjm(bdItemVo.getDbcdzTotalPrice().divide(diXiaShiArea, 2, RoundingMode.HALF_UP));
                    }
                }
                if (choiceItemVo != null && choiceItemVo.getSupplyCompany() != null) {
                    precipitateDb.setChoiceBasePriceC(choiceItemVo.getDbcdzTotalPrice());
                    if (new BigDecimal(choiceItemVo.getProject().getDiXiaShiArea().toString()).compareTo(BigDecimal.ZERO) != 0) {
                        precipitateDb.setChoiceBasePriceCjm(choiceItemVo.getDbcdzTotalPrice().divide(new BigDecimal(choiceItemVo.getProject().getDiXiaShiArea().toString()), 2, RoundingMode.HALF_UP));
                    }
                }
                for (FeXiExtractingVo tempVo : sValue) {
                    if (tempVo.getSupplyCompany() != null && tempVo.getJieDuan() == 6) {
                        precipitateDb.setDingBiaoPriceB(tempVo.getDbcdzTotalPrice());
                        if (diXiaShiArea.compareTo(BigDecimal.ZERO) != 0) {
                            precipitateDb.setDingBiaoPriceBjm(tempVo.getDbcdzTotalPrice().divide(diXiaShiArea, 2, RoundingMode.HALF_UP));
                        }
                    }
                }
            }
            if (i == 18) {
                if (bdItemVo != null && bdItemVo.getSupplyCompany() == null && bdItemVo.getJieDuan() == 1) {
                    precipitateDb.setBasePriceA(bdItemVo.getDbTotalPriceCount());
                    BigDecimal tempDbzzTotalPrice = BigDecimal.ZERO;
                    BigDecimal tempDbfjTotalPrice = BigDecimal.ZERO;
                    BigDecimal tempDbsyTotalPrice = BigDecimal.ZERO;
                    BigDecimal tempDbcdzTotalPrice = BigDecimal.ZERO;
                    if (zhuZhaiArea.compareTo(BigDecimal.ZERO) != 0) {
                        tempDbzzTotalPrice = bdItemVo.getDbzzTotalPrice().divide(zhuZhaiArea, 2, RoundingMode.HALF_UP);
                    }
                    if (diXiaShiArea.compareTo(BigDecimal.ZERO) != 0) {
                        tempDbfjTotalPrice = bdItemVo.getDbfjTotalPrice().divide(diXiaShiArea, 2, RoundingMode.HALF_UP);
                        tempDbcdzTotalPrice = bdItemVo.getDbcdzTotalPrice().divide(diXiaShiArea, 2, RoundingMode.HALF_UP);
                    }
                    if (shangYeArea.compareTo(BigDecimal.ZERO) != 0) {
                        tempDbsyTotalPrice = bdItemVo.getDbsyTotalPrice().divide(shangYeArea, 2, RoundingMode.HALF_UP);
                    }
                    precipitateDb.setBasePriceAjm(tempDbzzTotalPrice.add(tempDbfjTotalPrice).add(tempDbsyTotalPrice).add(tempDbcdzTotalPrice));
                }
                if (choiceItemVo != null && choiceItemVo.getSupplyCompany() != null) {
                    precipitateDb.setChoiceBasePriceC(choiceItemVo.getDbTotalPriceCount());
                    BigDecimal tempDbzzTotalPrice = BigDecimal.ZERO;
                    BigDecimal tempDbfjTotalPrice = BigDecimal.ZERO;
                    BigDecimal tempDbsyTotalPrice = BigDecimal.ZERO;
                    BigDecimal tempDbcdzTotalPrice = BigDecimal.ZERO;
                    if (new BigDecimal(choiceItemVo.getProject().getZhuZhaiArea().toString()).compareTo(BigDecimal.ZERO) != 0) {
                        tempDbzzTotalPrice = choiceItemVo.getDbzzTotalPrice().divide(new BigDecimal(choiceItemVo.getProject().getZhuZhaiArea().toString()), 2, RoundingMode.HALF_UP);
                    }
                    if (new BigDecimal(choiceItemVo.getProject().getDiXiaShiArea().toString()).compareTo(BigDecimal.ZERO) != 0) {
                        tempDbfjTotalPrice = choiceItemVo.getDbfjTotalPrice().divide(new BigDecimal(choiceItemVo.getProject().getDiXiaShiArea().toString()), 2, RoundingMode.HALF_UP);
                        tempDbcdzTotalPrice = choiceItemVo.getDbcdzTotalPrice().divide(new BigDecimal(choiceItemVo.getProject().getDiXiaShiArea().toString()), 2, RoundingMode.HALF_UP);
                    }
                    if (new BigDecimal(choiceItemVo.getProject().getShangYeArea().toString()).compareTo(BigDecimal.ZERO) != 0) {
                        tempDbsyTotalPrice = choiceItemVo.getDbsyTotalPrice().divide(new BigDecimal(choiceItemVo.getProject().getShangYeArea().toString()), 2, RoundingMode.HALF_UP);
                    }
                    precipitateDb.setChoiceBasePriceCjm(tempDbzzTotalPrice.add(tempDbfjTotalPrice).add(tempDbsyTotalPrice).add(tempDbcdzTotalPrice));
                }
                for (FeXiExtractingVo tempVo : sValue) {
                    if (tempVo.getSupplyCompany() != null && tempVo.getJieDuan() == 6) {
                        precipitateDb.setDingBiaoPriceB(tempVo.getDbTotalPriceCount());
                        BigDecimal tempDbzzTotalPrice = BigDecimal.ZERO;
                        BigDecimal tempDbfjTotalPrice = BigDecimal.ZERO;
                        BigDecimal tempDbsyTotalPrice = BigDecimal.ZERO;
                        BigDecimal tempDbcdzTotalPrice = BigDecimal.ZERO;
                        if (zhuZhaiArea.compareTo(BigDecimal.ZERO) != 0) {
                            tempDbzzTotalPrice = tempVo.getDbzzTotalPrice().divide(zhuZhaiArea, 2, RoundingMode.HALF_UP);
                        }
                        if (diXiaShiArea.compareTo(BigDecimal.ZERO) != 0) {
                            tempDbfjTotalPrice = tempVo.getDbfjTotalPrice().divide(diXiaShiArea, 2, RoundingMode.HALF_UP);
                            tempDbcdzTotalPrice = tempVo.getDbcdzTotalPrice().divide(diXiaShiArea, 2, RoundingMode.HALF_UP);
                        }
                        if (shangYeArea.compareTo(BigDecimal.ZERO) != 0) {
                            tempDbsyTotalPrice = tempVo.getDbsyTotalPrice().divide(shangYeArea, 2, RoundingMode.HALF_UP);
                        }
                        precipitateDb.setDingBiaoPriceBjm(tempDbzzTotalPrice.add(tempDbfjTotalPrice).add(tempDbsyTotalPrice).add(tempDbcdzTotalPrice));
                    }
                }
            }
            if (i == 19) {
                if (bdItemVo != null && bdItemVo.getSupplyCompany() == null && bdItemVo.getJieDuan() == 1) {
                    precipitateDb.setBasePriceA(bdItemVo.getDbxzzTotalPrice());
                    if (zhuZhaiArea.compareTo(BigDecimal.ZERO) != 0) {
                        precipitateDb.setBasePriceAjm(bdItemVo.getDbxzzTotalPrice().divide(zhuZhaiArea, 2, RoundingMode.HALF_UP));
                    }
                }
                if (choiceItemVo != null && choiceItemVo.getSupplyCompany() != null) {
                    precipitateDb.setChoiceBasePriceC(choiceItemVo.getDbxzzTotalPrice());
                    if (new BigDecimal(choiceItemVo.getProject().getZhuZhaiArea().toString()).compareTo(BigDecimal.ZERO) != 0) {
                        precipitateDb.setChoiceBasePriceCjm(choiceItemVo.getDbxzzTotalPrice().divide(new BigDecimal(choiceItemVo.getProject().getZhuZhaiArea().toString()), 2, RoundingMode.HALF_UP));
                    }
                }
                for (FeXiExtractingVo tempVo : sValue) {
                    if (tempVo.getSupplyCompany() != null && tempVo.getJieDuan() == 6) {
                        precipitateDb.setDingBiaoPriceB(tempVo.getDbxzzTotalPrice());
                        if (zhuZhaiArea.compareTo(BigDecimal.ZERO) != 0) {
                            precipitateDb.setDingBiaoPriceBjm(tempVo.getDbxzzTotalPrice().divide(zhuZhaiArea, 2, RoundingMode.HALF_UP));
                        }
                    }
                }
            }
            if (i == 20) {
                if (bdItemVo != null && bdItemVo.getSupplyCompany() == null && bdItemVo.getJieDuan() == 1) {
                    precipitateDb.setBasePriceA(bdItemVo.getDbxfjTotalPrice());
                    if (diXiaShiArea.compareTo(BigDecimal.ZERO) != 0) {
                        precipitateDb.setBasePriceAjm(bdItemVo.getDbxfjTotalPrice().divide(diXiaShiArea, 2, RoundingMode.HALF_UP));
                    }
                }
                if (choiceItemVo != null && choiceItemVo.getSupplyCompany() != null) {
                    precipitateDb.setChoiceBasePriceC(choiceItemVo.getDbxfjTotalPrice());
                    if (new BigDecimal(choiceItemVo.getProject().getDiXiaShiArea().toString()).compareTo(BigDecimal.ZERO) != 0) {
                        precipitateDb.setChoiceBasePriceCjm(choiceItemVo.getDbxfjTotalPrice().divide(new BigDecimal(choiceItemVo.getProject().getDiXiaShiArea().toString()), 2, RoundingMode.HALF_UP));
                    }
                }
                for (FeXiExtractingVo tempVo : sValue) {
                    if (tempVo.getSupplyCompany() != null && tempVo.getJieDuan() == 6) {
                        precipitateDb.setDingBiaoPriceB(tempVo.getDbxfjTotalPrice());
                        if (diXiaShiArea.compareTo(BigDecimal.ZERO) != 0) {
                            precipitateDb.setDingBiaoPriceBjm(tempVo.getDbxfjTotalPrice().divide(diXiaShiArea, 2, RoundingMode.HALF_UP));
                        }
                    }
                }
            }
            if (i == 21) {
                if (bdItemVo != null && bdItemVo.getSupplyCompany() == null && bdItemVo.getJieDuan() == 1) {
                    precipitateDb.setBasePriceA(bdItemVo.getDbxsyTotalPrice());
                    if (shangYeArea.compareTo(BigDecimal.ZERO) != 0) {
                        precipitateDb.setBasePriceAjm(bdItemVo.getDbxsyTotalPrice().divide(shangYeArea, 2, RoundingMode.HALF_UP));
                    }
                }
                if (choiceItemVo != null && choiceItemVo.getSupplyCompany() != null) {
                    precipitateDb.setChoiceBasePriceC(choiceItemVo.getDbxsyTotalPrice());
                    if (new BigDecimal(choiceItemVo.getProject().getShangYeArea().toString()).compareTo(BigDecimal.ZERO) != 0) {
                        precipitateDb.setChoiceBasePriceCjm(choiceItemVo.getDbxsyTotalPrice().divide(new BigDecimal(choiceItemVo.getProject().getShangYeArea().toString()), 2, RoundingMode.HALF_UP));
                    }
                }
                for (FeXiExtractingVo tempVo : sValue) {
                    if (tempVo.getSupplyCompany() != null && tempVo.getJieDuan() == 6) {
                        precipitateDb.setDingBiaoPriceB(tempVo.getDbxsyTotalPrice());
                        if (shangYeArea.compareTo(BigDecimal.ZERO) != 0) {
                            precipitateDb.setDingBiaoPriceBjm(tempVo.getDbxsyTotalPrice().divide(shangYeArea, 2, RoundingMode.HALF_UP));
                        }
                    }
                }
            }
            if (i == 22) {
                if (bdItemVo != null && bdItemVo.getSupplyCompany() == null && bdItemVo.getJieDuan() == 1) {
                    precipitateDb.setBasePriceA(bdItemVo.getDbxcdzTotalPrice());
                    if (diXiaShiArea.compareTo(BigDecimal.ZERO) != 0) {
                        precipitateDb.setBasePriceAjm(bdItemVo.getDbxcdzTotalPrice().divide(diXiaShiArea, 2, RoundingMode.HALF_UP));
                    }
                }
                if (choiceItemVo != null && choiceItemVo.getSupplyCompany() != null) {
                    precipitateDb.setChoiceBasePriceC(choiceItemVo.getDbxcdzTotalPrice());
                    if (new BigDecimal(choiceItemVo.getProject().getDiXiaShiArea().toString()).compareTo(BigDecimal.ZERO) != 0) {
                        precipitateDb.setChoiceBasePriceCjm(choiceItemVo.getDbxcdzTotalPrice().divide(new BigDecimal(choiceItemVo.getProject().getDiXiaShiArea().toString()), 2, RoundingMode.HALF_UP));
                    }
                }
                for (FeXiExtractingVo tempVo : sValue) {
                    if (tempVo.getSupplyCompany() != null && tempVo.getJieDuan() == 6) {
                        precipitateDb.setDingBiaoPriceB(tempVo.getDbxcdzTotalPrice());
                        if (diXiaShiArea.compareTo(BigDecimal.ZERO) != 0) {
                            precipitateDb.setDingBiaoPriceBjm(tempVo.getDbxcdzTotalPrice().divide(diXiaShiArea, 2, RoundingMode.HALF_UP));
                        }
                    }
                }
            }
            if (i == 23) {
                if (bdItemVo != null && bdItemVo.getSupplyCompany() == null && bdItemVo.getJieDuan() == 1) {
                    precipitateDb.setBasePriceA(bdItemVo.getDbxTotalPriceCount());
                    BigDecimal tempDbxzzTotalPrice = BigDecimal.ZERO;
                    BigDecimal tempDbxfjTotalPrice = BigDecimal.ZERO;
                    BigDecimal tempDbxsyTotalPrice = BigDecimal.ZERO;
                    BigDecimal tempDbxcdzTotalPrice = BigDecimal.ZERO;
                    if (zhuZhaiArea.compareTo(BigDecimal.ZERO) != 0) {
                        tempDbxzzTotalPrice = bdItemVo.getDbxzzTotalPrice().divide(zhuZhaiArea, 2, RoundingMode.HALF_UP);
                    }
                    if (diXiaShiArea.compareTo(BigDecimal.ZERO) != 0) {
                        tempDbxfjTotalPrice = bdItemVo.getDbxfjTotalPrice().divide(diXiaShiArea, 2, RoundingMode.HALF_UP);
                        tempDbxcdzTotalPrice = bdItemVo.getDbxcdzTotalPrice().divide(diXiaShiArea, 2, RoundingMode.HALF_UP);
                    }
                    if (shangYeArea.compareTo(BigDecimal.ZERO) != 0) {
                        tempDbxsyTotalPrice = bdItemVo.getDbxsyTotalPrice().divide(shangYeArea, 2, RoundingMode.HALF_UP);
                    }
                    precipitateDb.setBasePriceAjm(tempDbxzzTotalPrice.add(tempDbxfjTotalPrice).add(tempDbxsyTotalPrice).add(tempDbxcdzTotalPrice));
                }
                if (choiceItemVo != null && choiceItemVo.getSupplyCompany() != null) {
                    precipitateDb.setChoiceBasePriceC(choiceItemVo.getDbxTotalPriceCount());
                    BigDecimal tempDbxzzTotalPrice = BigDecimal.ZERO;
                    BigDecimal tempDbxfjTotalPrice = BigDecimal.ZERO;
                    BigDecimal tempDbxsyTotalPrice = BigDecimal.ZERO;
                    BigDecimal tempDbxcdzTotalPrice = BigDecimal.ZERO;
                    if (new BigDecimal(choiceItemVo.getProject().getZhuZhaiArea().toString()).compareTo(BigDecimal.ZERO) != 0) {
                        tempDbxzzTotalPrice = choiceItemVo.getDbxzzTotalPrice().divide(new BigDecimal(choiceItemVo.getProject().getZhuZhaiArea().toString()), 2, RoundingMode.HALF_UP);
                    }
                    if (new BigDecimal(choiceItemVo.getProject().getDiXiaShiArea().toString()).compareTo(BigDecimal.ZERO) != 0) {
                        tempDbxfjTotalPrice = choiceItemVo.getDbxfjTotalPrice().divide(new BigDecimal(choiceItemVo.getProject().getDiXiaShiArea().toString()), 2, RoundingMode.HALF_UP);
                        tempDbxcdzTotalPrice = choiceItemVo.getDbxcdzTotalPrice().divide(new BigDecimal(choiceItemVo.getProject().getDiXiaShiArea().toString()), 2, RoundingMode.HALF_UP);
                    }
                    if (new BigDecimal(choiceItemVo.getProject().getShangYeArea().toString()).compareTo(BigDecimal.ZERO) != 0) {
                        tempDbxsyTotalPrice = choiceItemVo.getDbxsyTotalPrice().divide(new BigDecimal(choiceItemVo.getProject().getShangYeArea().toString()), 2, RoundingMode.HALF_UP);
                    }
                    precipitateDb.setChoiceBasePriceCjm(tempDbxzzTotalPrice.add(tempDbxfjTotalPrice).add(tempDbxsyTotalPrice).add(tempDbxcdzTotalPrice));
                }
                for (FeXiExtractingVo tempVo : sValue) {
                    if (tempVo.getSupplyCompany() != null && tempVo.getJieDuan() == 6) {
                        precipitateDb.setDingBiaoPriceB(tempVo.getDbxTotalPriceCount());
                        BigDecimal tempDbxzzTotalPrice = BigDecimal.ZERO;
                        BigDecimal tempDbxfjTotalPrice = BigDecimal.ZERO;
                        BigDecimal tempDbxsyTotalPrice = BigDecimal.ZERO;
                        BigDecimal tempDbxcdzTotalPrice = BigDecimal.ZERO;
                        if (zhuZhaiArea.compareTo(BigDecimal.ZERO) != 0) {
                            tempDbxzzTotalPrice = tempVo.getDbxzzTotalPrice().divide(zhuZhaiArea, 2, RoundingMode.HALF_UP);
                        }
                        if (diXiaShiArea.compareTo(BigDecimal.ZERO) != 0) {
                            tempDbxfjTotalPrice = tempVo.getDbxfjTotalPrice().divide(diXiaShiArea, 2, RoundingMode.HALF_UP);
                            tempDbxcdzTotalPrice = tempVo.getDbxcdzTotalPrice().divide(diXiaShiArea, 2, RoundingMode.HALF_UP);
                        }
                        if (shangYeArea.compareTo(BigDecimal.ZERO) != 0) {
                            tempDbxsyTotalPrice = tempVo.getDbxsyTotalPrice().divide(shangYeArea, 2, RoundingMode.HALF_UP);
                        }
                        precipitateDb.setDingBiaoPriceBjm(tempDbxzzTotalPrice.add(tempDbxfjTotalPrice).add(tempDbxsyTotalPrice).add(tempDbxcdzTotalPrice));
                    }
                }
            }
            if (i == 24) {
                if (bdItemVo != null && bdItemVo.getSupplyCompany() == null && bdItemVo.getJieDuan() == 1) {
                    precipitateDb.setBasePriceA(bdItemVo.getDydlzzTotalPrice());
                    if (zhuZhaiArea.compareTo(BigDecimal.ZERO) != 0) {
                        precipitateDb.setBasePriceAjm(bdItemVo.getDydlzzTotalPrice().divide(zhuZhaiArea, 2, RoundingMode.HALF_UP));
                    }
                }
                if (choiceItemVo != null && choiceItemVo.getSupplyCompany() != null) {
                    precipitateDb.setChoiceBasePriceC(choiceItemVo.getDydlzzTotalPrice());
                    if (new BigDecimal(choiceItemVo.getProject().getZhuZhaiArea().toString()).compareTo(BigDecimal.ZERO) != 0) {
                        precipitateDb.setChoiceBasePriceCjm(choiceItemVo.getDydlzzTotalPrice().divide(new BigDecimal(choiceItemVo.getProject().getZhuZhaiArea().toString()), 2, RoundingMode.HALF_UP));
                    }
                }
                for (FeXiExtractingVo tempVo : sValue) {
                    if (tempVo.getSupplyCompany() != null && tempVo.getJieDuan() == 6) {
                        precipitateDb.setDingBiaoPriceB(tempVo.getDydlzzTotalPrice());
                        if (zhuZhaiArea.compareTo(BigDecimal.ZERO) != 0) {
                            precipitateDb.setDingBiaoPriceBjm(tempVo.getDydlzzTotalPrice().divide(zhuZhaiArea, 2, RoundingMode.HALF_UP));
                        }
                    }
                }
            }
            if (i == 25) {
                if (bdItemVo != null && bdItemVo.getSupplyCompany() == null && bdItemVo.getJieDuan() == 1) {
                    precipitateDb.setBasePriceA(bdItemVo.getDydlfjTotalPrice());
                    if (diXiaShiArea.compareTo(BigDecimal.ZERO) != 0) {
                        precipitateDb.setBasePriceAjm(bdItemVo.getDydlfjTotalPrice().divide(diXiaShiArea, 2, RoundingMode.HALF_UP));
                    }
                }
                if (choiceItemVo != null && choiceItemVo.getSupplyCompany() != null) {
                    precipitateDb.setChoiceBasePriceC(choiceItemVo.getDydlfjTotalPrice());
                    if (new BigDecimal(choiceItemVo.getProject().getDiXiaShiArea().toString()).compareTo(BigDecimal.ZERO) != 0) {
                        precipitateDb.setChoiceBasePriceCjm(choiceItemVo.getDydlfjTotalPrice().divide(new BigDecimal(choiceItemVo.getProject().getDiXiaShiArea().toString()), 2, RoundingMode.HALF_UP));
                    }
                }
                for (FeXiExtractingVo tempVo : sValue) {
                    if (tempVo.getSupplyCompany() != null && tempVo.getJieDuan() == 6) {
                        precipitateDb.setDingBiaoPriceB(tempVo.getDydlfjTotalPrice());
                        if (diXiaShiArea.compareTo(BigDecimal.ZERO) != 0) {
                            precipitateDb.setDingBiaoPriceBjm(tempVo.getDydlfjTotalPrice().divide(diXiaShiArea, 2, RoundingMode.HALF_UP));
                        }
                    }
                }
            }
            if (i == 26) {
                if (bdItemVo != null && bdItemVo.getSupplyCompany() == null && bdItemVo.getJieDuan() == 1) {
                    precipitateDb.setBasePriceA(bdItemVo.getDydlsyTotalPrice());
                    if (shangYeArea.compareTo(BigDecimal.ZERO) != 0) {
                        precipitateDb.setBasePriceAjm(bdItemVo.getDydlsyTotalPrice().divide(shangYeArea, 2, RoundingMode.HALF_UP));
                    }
                }
                if (choiceItemVo != null && choiceItemVo.getSupplyCompany() != null) {
                    precipitateDb.setChoiceBasePriceC(choiceItemVo.getDydlsyTotalPrice());
                    if (new BigDecimal(choiceItemVo.getProject().getShangYeArea().toString()).compareTo(BigDecimal.ZERO) != 0) {
                        precipitateDb.setChoiceBasePriceCjm(choiceItemVo.getDydlsyTotalPrice().divide(new BigDecimal(choiceItemVo.getProject().getShangYeArea().toString()), 2, RoundingMode.HALF_UP));
                    }
                }
                for (FeXiExtractingVo tempVo : sValue) {
                    if (tempVo.getSupplyCompany() != null && tempVo.getJieDuan() == 6) {
                        precipitateDb.setDingBiaoPriceB(tempVo.getDydlsyTotalPrice());
                        if (shangYeArea.compareTo(BigDecimal.ZERO) != 0) {
                            precipitateDb.setDingBiaoPriceBjm(tempVo.getDydlsyTotalPrice().divide(shangYeArea, 2, RoundingMode.HALF_UP));
                        }
                    }
                }
            }
            if (i == 27) {
                if (bdItemVo != null && bdItemVo.getSupplyCompany() == null && bdItemVo.getJieDuan() == 1) {
                    precipitateDb.setBasePriceA(bdItemVo.getDydlcdzTotalPrice());
                    if (diXiaShiArea.compareTo(BigDecimal.ZERO) != 0) {
                        precipitateDb.setBasePriceAjm(bdItemVo.getDydlcdzTotalPrice().divide(diXiaShiArea, 2, RoundingMode.HALF_UP));
                    }
                }
                if (choiceItemVo != null && choiceItemVo.getSupplyCompany() != null) {
                    precipitateDb.setChoiceBasePriceC(choiceItemVo.getDydlcdzTotalPrice());
                    if (new BigDecimal(choiceItemVo.getProject().getDiXiaShiArea().toString()).compareTo(BigDecimal.ZERO) != 0) {
                        precipitateDb.setChoiceBasePriceCjm(choiceItemVo.getDydlcdzTotalPrice().divide(new BigDecimal(choiceItemVo.getProject().getDiXiaShiArea().toString()), 2, RoundingMode.HALF_UP));
                    }
                }
                for (FeXiExtractingVo tempVo : sValue) {
                    if (tempVo.getSupplyCompany() != null && tempVo.getJieDuan() == 6) {
                        precipitateDb.setDingBiaoPriceB(tempVo.getDydlcdzTotalPrice());
                        if (diXiaShiArea.compareTo(BigDecimal.ZERO) != 0) {
                            precipitateDb.setDingBiaoPriceBjm(tempVo.getDydlcdzTotalPrice().divide(diXiaShiArea, 2, RoundingMode.HALF_UP));
                        }
                    }
                }
            }
            if (i == 28) {
                if (bdItemVo != null && bdItemVo.getSupplyCompany() == null && bdItemVo.getJieDuan() == 1) {
                    precipitateDb.setBasePriceA(bdItemVo.getDydlTotalPriceCount());
                    BigDecimal tempDydlzzTotalPrice = BigDecimal.ZERO;
                    BigDecimal tempDydlfjTotalPrice = BigDecimal.ZERO;
                    BigDecimal tempDydlsyTotalPrice = BigDecimal.ZERO;
                    BigDecimal tempDydlcdzTotalPrice = BigDecimal.ZERO;
                    if (zhuZhaiArea.compareTo(BigDecimal.ZERO) != 0) {
                        tempDydlzzTotalPrice = bdItemVo.getDydlzzTotalPrice().divide(zhuZhaiArea, 2, RoundingMode.HALF_UP);
                    }
                    if (diXiaShiArea.compareTo(BigDecimal.ZERO) != 0) {
                        tempDydlfjTotalPrice = bdItemVo.getDydlfjTotalPrice().divide(diXiaShiArea, 2, RoundingMode.HALF_UP);
                        tempDydlcdzTotalPrice = bdItemVo.getDydlcdzTotalPrice().divide(diXiaShiArea, 2, RoundingMode.HALF_UP);
                    }
                    if (shangYeArea.compareTo(BigDecimal.ZERO) != 0) {
                        tempDydlsyTotalPrice = bdItemVo.getDydlsyTotalPrice().divide(shangYeArea, 2, RoundingMode.HALF_UP);
                    }
                    precipitateDb.setBasePriceAjm(tempDydlzzTotalPrice.add(tempDydlfjTotalPrice).add(tempDydlsyTotalPrice).add(tempDydlcdzTotalPrice));
                }
                if (choiceItemVo != null && choiceItemVo.getSupplyCompany() != null) {
                    precipitateDb.setChoiceBasePriceC(choiceItemVo.getDydlTotalPriceCount());
                    BigDecimal tempDydlzzTotalPrice = BigDecimal.ZERO;
                    BigDecimal tempDydlfjTotalPrice = BigDecimal.ZERO;
                    BigDecimal tempDydlsyTotalPrice = BigDecimal.ZERO;
                    BigDecimal tempDydlcdzTotalPrice = BigDecimal.ZERO;
                    if (new BigDecimal(choiceItemVo.getProject().getZhuZhaiArea().toString()).compareTo(BigDecimal.ZERO) != 0) {
                        tempDydlzzTotalPrice = choiceItemVo.getDydlzzTotalPrice().divide(new BigDecimal(choiceItemVo.getProject().getZhuZhaiArea().toString()), 2, RoundingMode.HALF_UP);
                    }
                    if (new BigDecimal(choiceItemVo.getProject().getDiXiaShiArea().toString()).compareTo(BigDecimal.ZERO) != 0) {
                        tempDydlfjTotalPrice = choiceItemVo.getDydlfjTotalPrice().divide(new BigDecimal(choiceItemVo.getProject().getDiXiaShiArea().toString()), 2, RoundingMode.HALF_UP);
                        tempDydlcdzTotalPrice = choiceItemVo.getDydlcdzTotalPrice().divide(new BigDecimal(choiceItemVo.getProject().getDiXiaShiArea().toString()), 2, RoundingMode.HALF_UP);
                    }
                    if (new BigDecimal(choiceItemVo.getProject().getShangYeArea().toString()).compareTo(BigDecimal.ZERO) != 0) {
                        tempDydlsyTotalPrice = choiceItemVo.getDydlsyTotalPrice().divide(new BigDecimal(choiceItemVo.getProject().getShangYeArea().toString()), 2, RoundingMode.HALF_UP);
                    }
                    precipitateDb.setChoiceBasePriceCjm(tempDydlzzTotalPrice.add(tempDydlfjTotalPrice).add(tempDydlsyTotalPrice).add(tempDydlcdzTotalPrice));
                }
                for (FeXiExtractingVo tempVo : sValue) {
                    if (tempVo.getSupplyCompany() != null && tempVo.getJieDuan() == 6) {
                        precipitateDb.setDingBiaoPriceB(tempVo.getDydlTotalPriceCount());
                        BigDecimal tempDydlzzTotalPrice = BigDecimal.ZERO;
                        BigDecimal tempDydlfjTotalPrice = BigDecimal.ZERO;
                        BigDecimal tempDydlsyTotalPrice = BigDecimal.ZERO;
                        BigDecimal tempDydlcdzTotalPrice = BigDecimal.ZERO;
                        if (zhuZhaiArea.compareTo(BigDecimal.ZERO) != 0) {
                            tempDydlzzTotalPrice = tempVo.getDydlzzTotalPrice().divide(zhuZhaiArea, 2, RoundingMode.HALF_UP);
                        }
                        if (diXiaShiArea.compareTo(BigDecimal.ZERO) != 0) {
                            tempDydlfjTotalPrice = tempVo.getDydlfjTotalPrice().divide(diXiaShiArea, 2, RoundingMode.HALF_UP);
                            tempDydlcdzTotalPrice = tempVo.getDydlcdzTotalPrice().divide(diXiaShiArea, 2, RoundingMode.HALF_UP);
                        }
                        if (shangYeArea.compareTo(BigDecimal.ZERO) != 0) {
                            tempDydlsyTotalPrice = tempVo.getDydlsyTotalPrice().divide(shangYeArea, 2, RoundingMode.HALF_UP);
                        }
                        precipitateDb.setDingBiaoPriceBjm(tempDydlzzTotalPrice.add(tempDydlfjTotalPrice).add(tempDydlsyTotalPrice).add(tempDydlcdzTotalPrice));
                    }
                }
            }
            if (i == 29) {
                if (bdItemVo != null && bdItemVo.getSupplyCompany() == null && bdItemVo.getJieDuan() == 1) {
                    precipitateDb.setBasePriceA(bdItemVo.getMxcTotalPrice());
                    if (zongArea.compareTo(BigDecimal.ZERO) != 0) {
                        precipitateDb.setBasePriceAjm(bdItemVo.getMxcTotalPrice().divide(zongArea, 2, RoundingMode.HALF_UP));
                    }
                }
                if (choiceItemVo != null && choiceItemVo.getSupplyCompany() != null) {
                    precipitateDb.setChoiceBasePriceC(choiceItemVo.getMxcTotalPrice());
                    if (new BigDecimal(choiceItemVo.getProject().getZongArea().toString()).compareTo(BigDecimal.ZERO) != 0) {
                        precipitateDb.setChoiceBasePriceCjm(choiceItemVo.getMxcTotalPrice().divide(new BigDecimal(choiceItemVo.getProject().getZongArea().toString()), 2, RoundingMode.HALF_UP));
                    }
                }
                for (FeXiExtractingVo tempVo : sValue) {
                    if (tempVo.getSupplyCompany() != null && tempVo.getJieDuan() == 6) {
                        precipitateDb.setDingBiaoPriceB(tempVo.getMxcTotalPrice());
                        if (zongArea.compareTo(BigDecimal.ZERO) != 0) {
                            precipitateDb.setDingBiaoPriceBjm(tempVo.getMxcTotalPrice().divide(zongArea, 2, RoundingMode.HALF_UP));
                        }
                    }
                }
            }
            if (i == 30) {
                if (bdItemVo != null && bdItemVo.getSupplyCompany() == null && bdItemVo.getJieDuan() == 1) {
                    precipitateDb.setBasePriceA(bdItemVo.getGydlTotalPrice());
                    if (zongArea.compareTo(BigDecimal.ZERO) != 0) {
                        precipitateDb.setBasePriceAjm(bdItemVo.getGydlTotalPrice().divide(zongArea, 2, RoundingMode.HALF_UP));
                    }
                }
                if (choiceItemVo != null && choiceItemVo.getSupplyCompany() != null) {
                    precipitateDb.setChoiceBasePriceC(choiceItemVo.getGydlTotalPrice());
                    if (new BigDecimal(choiceItemVo.getProject().getZongArea().toString()).compareTo(BigDecimal.ZERO) != 0) {
                        precipitateDb.setChoiceBasePriceCjm(choiceItemVo.getGydlTotalPrice().divide(new BigDecimal(choiceItemVo.getProject().getZongArea().toString()), 2, RoundingMode.HALF_UP));
                    }
                }
                for (FeXiExtractingVo tempVo : sValue) {
                    if (tempVo.getSupplyCompany() != null && tempVo.getJieDuan() == 6) {
                        precipitateDb.setDingBiaoPriceB(tempVo.getGydlTotalPrice());
                        if (zongArea.compareTo(BigDecimal.ZERO) != 0) {
                            precipitateDb.setDingBiaoPriceBjm(tempVo.getGydlTotalPrice().divide(zongArea, 2, RoundingMode.HALF_UP));
                        }
                    }
                }
            }
            if (i == 31) {
                if (bdItemVo != null && bdItemVo.getSupplyCompany() == null && bdItemVo.getJieDuan() == 1) {
                    precipitateDb.setBasePriceA(bdItemVo.getPdxTotalPrice());
                    if (zongArea.compareTo(BigDecimal.ZERO) != 0) {
                        precipitateDb.setBasePriceAjm(bdItemVo.getPdxTotalPrice().divide(zongArea, 2, RoundingMode.HALF_UP));
                    }
                }
                if (choiceItemVo != null && choiceItemVo.getSupplyCompany() != null) {
                    precipitateDb.setChoiceBasePriceC(choiceItemVo.getPdxTotalPrice());
                    if (new BigDecimal(choiceItemVo.getProject().getZongArea().toString()).compareTo(BigDecimal.ZERO) != 0) {
                        precipitateDb.setChoiceBasePriceCjm(choiceItemVo.getPdxTotalPrice().divide(new BigDecimal(choiceItemVo.getProject().getZongArea().toString()), 2, RoundingMode.HALF_UP));
                    }
                }
                for (FeXiExtractingVo tempVo : sValue) {
                    if (tempVo.getSupplyCompany() != null && tempVo.getJieDuan() == 6) {
                        precipitateDb.setDingBiaoPriceB(tempVo.getPdxTotalPrice());
                        if (zongArea.compareTo(BigDecimal.ZERO) != 0) {
                            precipitateDb.setDingBiaoPriceBjm(tempVo.getPdxTotalPrice().divide(zongArea, 2, RoundingMode.HALF_UP));
                        }
                    }
                }
            }
            if (i == 32) {
                if (bdItemVo != null && bdItemVo.getSupplyCompany() == null && bdItemVo.getJieDuan() == 1) {
                    precipitateDb.setBasePriceA(bdItemVo.getTsTotalPrice());
                    if (zongArea.compareTo(BigDecimal.ZERO) != 0) {
                        precipitateDb.setBasePriceAjm(bdItemVo.getTsTotalPrice().divide(zongArea, 2, RoundingMode.HALF_UP));
                    }
                }
                if (choiceItemVo != null && bdItemVo.getSupplyCompany() != null) {
                    precipitateDb.setChoiceBasePriceC(bdItemVo.getTsTotalPrice());
                    if (new BigDecimal(choiceItemVo.getProject().getZongArea().toString()).compareTo(BigDecimal.ZERO) != 0) {
                        precipitateDb.setChoiceBasePriceCjm(bdItemVo.getTsTotalPrice().divide(new BigDecimal(choiceItemVo.getProject().getZongArea().toString()), 2, RoundingMode.HALF_UP));
                    }
                }
                for (FeXiExtractingVo tempVo : sValue) {
                    if (tempVo.getSupplyCompany() != null && tempVo.getJieDuan() == 6) {
                        precipitateDb.setDingBiaoPriceB(tempVo.getTsTotalPrice());
                        if (zongArea.compareTo(BigDecimal.ZERO) != 0) {
                            precipitateDb.setDingBiaoPriceBjm(tempVo.getTsTotalPrice().divide(zongArea, 2, RoundingMode.HALF_UP));
                        }
                    }
                }
            }
            if (i == 33) {
                if (bdItemVo != null && bdItemVo.getSupplyCompany() == null && bdItemVo.getJieDuan() == 1) {
                    precipitateDb.setBasePriceA(bdItemVo.getSxfTotalPrice());
                    if (zongArea.compareTo(BigDecimal.ZERO) != 0) {
                        precipitateDb.setBasePriceAjm(bdItemVo.getSxfTotalPrice().divide(zongArea, 2, RoundingMode.HALF_UP));
                    }
                }
                if (choiceItemVo != null && choiceItemVo.getSupplyCompany() != null) {
                    precipitateDb.setChoiceBasePriceC(choiceItemVo.getSxfTotalPrice());
                    if (new BigDecimal(choiceItemVo.getProject().getZongArea().toString()).compareTo(BigDecimal.ZERO) != 0) {
                        precipitateDb.setChoiceBasePriceCjm(choiceItemVo.getSxfTotalPrice().divide(new BigDecimal(choiceItemVo.getProject().getZongArea().toString()), 2, RoundingMode.HALF_UP));
                    }
                }
                for (FeXiExtractingVo tempVo : sValue) {
                    if (tempVo.getSupplyCompany() != null && tempVo.getJieDuan() == 6) {
                        precipitateDb.setDingBiaoPriceB(tempVo.getSxfTotalPrice());
                        if (zongArea.compareTo(BigDecimal.ZERO) != 0) {
                            precipitateDb.setDingBiaoPriceBjm(tempVo.getSxfTotalPrice().divide(zongArea, 2, RoundingMode.HALF_UP));
                        }
                    }
                }
            }
            if (i == 34) {
                if (bdItemVo != null && bdItemVo.getSupplyCompany() == null && bdItemVo.getJieDuan() == 1) {
                    precipitateDb.setBasePriceA(bdItemVo.getQtTotalPrice());
                    if (zongArea.compareTo(BigDecimal.ZERO) != 0) {
                        precipitateDb.setBasePriceAjm(bdItemVo.getQtTotalPrice().divide(zongArea, 2, RoundingMode.HALF_UP));
                    }
                }
                if (choiceItemVo != null && choiceItemVo.getSupplyCompany() != null) {
                    precipitateDb.setChoiceBasePriceC(choiceItemVo.getQtTotalPrice());
                    if (new BigDecimal(choiceItemVo.getProject().getZongArea().toString()).compareTo(BigDecimal.ZERO) != 0) {
                        precipitateDb.setChoiceBasePriceCjm(choiceItemVo.getQtTotalPrice().divide(new BigDecimal(choiceItemVo.getProject().getZongArea().toString()), 2, RoundingMode.HALF_UP));
                    }
                }
                for (FeXiExtractingVo tempVo : sValue) {
                    if (tempVo.getSupplyCompany() != null && tempVo.getJieDuan() == 6) {
                        precipitateDb.setDingBiaoPriceB(tempVo.getQtTotalPrice());
                        if (zongArea.compareTo(BigDecimal.ZERO) != 0) {
                            precipitateDb.setDingBiaoPriceBjm(tempVo.getQtTotalPrice().divide(zongArea, 2, RoundingMode.HALF_UP));
                        }
                    }
                }
            }
            precipitateDbList.add(precipitateDb);
        }
        return precipitateDbList;
    }


    /**
     * 计算并保存实施定标沉淀数据
     *
     * @param projectId
     */
    public void handlePrecipitateSsdb(Long projectId) {
        Project project = projectService.findOne(projectId);
        //计算 定标、实施定标时评标公司及清单沉淀数据
        List<FeXiExtractingVo> voList = getDbSupplyData(project);

        List<FeXiExtractingVo> gsList = new ArrayList<>();
        FeXiExtractingVo bdItemVo = null;
        FeXiExtractingVo ssbdItemVo = null;
        for (FeXiExtractingVo vo : voList) {
            if (vo.getSupplyCompany() == null && vo.getJieDuan() == 1) {
                bdItemVo = vo;
            } else if (vo.getSupplyCompany() == null && vo.getJieDuan() == 7) {
                ssbdItemVo = vo;
            } else {
                gsList.add(vo);
            }
        }
        //将FeXiExtractingVo的数据行转列存储到Precipitate表中
        Map<Long, List<FeXiExtractingVo>> suNameList = gsList.stream().collect(Collectors.groupingBy(vo -> vo.getSupplyCompany().getId()));
        for (Map.Entry<Long, List<FeXiExtractingVo>> sItem : suNameList.entrySet()) {
            List<FeXiExtractingVo> sValue = sItem.getValue();
            List<PrecipitateSsdb> precipitateSsdbList = rowToColumnSsbd(project, sValue, bdItemVo, ssbdItemVo);
            //计算标底与剩下的供应商的差异（C-A、D-C）
            for (PrecipitateSsdb p : precipitateSsdbList) {
                if (p.getBasePriceA() != null && p.getSsBasePriceC() != null) {
                    BigDecimal result = p.getSsBasePriceC().subtract(p.getBasePriceA());
                    p.setCaPrice(result.divide(new BigDecimal("10000"), 2, RoundingMode.HALF_UP));
                }
                if (p.getBasePriceAjm() != null && p.getSsBasePriceCjm() != null) {
                    p.setCaPriceJm(p.getSsBasePriceCjm().subtract(p.getBasePriceAjm()));
                }
                if (p.getSsBasePriceC() != null && p.getSsDingBiaoPriceD() != null) {
                    BigDecimal result = p.getSsDingBiaoPriceD().subtract(p.getSsBasePriceC());
                    p.setDcPrice(result.divide(new BigDecimal("10000"), 2, RoundingMode.HALF_UP));
                }
                if (p.getSsBasePriceCjm() != null && p.getSsDingBiaoPriceDjm() != null) {
                    p.setDcPriceJm(p.getSsDingBiaoPriceDjm().subtract(p.getSsBasePriceCjm()));
                }
            }
            precipitateSsdbService.save(precipitateSsdbList);
        }
    }


    /**
     * 将FeXiExtractingVo的数据行转列存储到PrecipitateSsbd表中
     *
     * @param project
     * @param sValue
     * @param bdItemVo
     * @param ssbdItemVo
     * @return
     */
    public List<PrecipitateSsdb> rowToColumnSsbd(Project project, List<FeXiExtractingVo> sValue, FeXiExtractingVo bdItemVo, FeXiExtractingVo ssbdItemVo) {
        List<PrecipitateSsdb> precipitateSsdbList = new ArrayList<>();
        BigDecimal zongArea = new BigDecimal(project.getZongArea().toString());
        BigDecimal zhuZhaiArea = new BigDecimal(project.getZhuZhaiArea().toString());
        BigDecimal diXiaShiArea = new BigDecimal(project.getDiXiaShiArea().toString());
        BigDecimal shangYeArea = new BigDecimal(project.getShangYeArea().toString());
        //35个沉淀分析计算、保存
        for (int i = 0; i < 35; i++) {
            PrecipitateSsdb precipitateSsdb = new PrecipitateSsdb();
            precipitateSsdb.setProject(project);
            precipitateSsdb.setSupplyCompany(sValue.get(0).getSupplyCompany());
            precipitateSsdb.setFenXiType(i + 1);
            if (i == 0) {
                if (bdItemVo != null && bdItemVo.getSupplyCompany() == null && bdItemVo.getJieDuan() == 1) {
                    precipitateSsdb.setBasePriceA(bdItemVo.getOuterZdf());
                }
                if (ssbdItemVo != null && ssbdItemVo.getSupplyCompany() == null && ssbdItemVo.getJieDuan() == 7) {
                    precipitateSsdb.setSsBasePriceC(ssbdItemVo.getOuterZdf());
                }
                for (FeXiExtractingVo tempVo : sValue) {
                    if (tempVo.getSupplyCompany() != null && tempVo.getJieDuan() == 6) {
                        precipitateSsdb.setDingBiaoPriceB(tempVo.getOuterZdf());
                    } else if (tempVo.getSupplyCompany() != null && tempVo.getJieDuan() == 8) {
                    }
                }
            }
            if (i == 1) {
                if (bdItemVo != null && bdItemVo.getSupplyCompany() == null && bdItemVo.getJieDuan() == 1) {
                    precipitateSsdb.setBasePriceA(bdItemVo.getInnerZdf());
                    if (zongArea.compareTo(BigDecimal.ZERO) != 0) {
                        precipitateSsdb.setBasePriceAjm(bdItemVo.getInnerZdf().divide(zongArea, 2, RoundingMode.HALF_UP));
                    }
                }
                if (ssbdItemVo != null && ssbdItemVo.getSupplyCompany() == null && ssbdItemVo.getJieDuan() == 7) {
                    precipitateSsdb.setSsBasePriceC(ssbdItemVo.getInnerZdf());
                    if (zongArea.compareTo(BigDecimal.ZERO) != 0) {
                        precipitateSsdb.setSsBasePriceCjm(ssbdItemVo.getInnerZdf().divide(zongArea, 2, RoundingMode.HALF_UP));
                    }
                }
                for (FeXiExtractingVo tempVo : sValue) {
                    if (tempVo.getSupplyCompany() != null && tempVo.getJieDuan() == 6) {
                        precipitateSsdb.setDingBiaoPriceB(tempVo.getInnerZdf());
                        if (zongArea.compareTo(BigDecimal.ZERO) != 0) {
                            precipitateSsdb.setDingBiaoPriceBjm(tempVo.getInnerZdf().divide(zongArea, 2, RoundingMode.HALF_UP));
                        }
                    } else if (tempVo.getSupplyCompany() != null && tempVo.getJieDuan() == 8) {
                        precipitateSsdb.setSsDingBiaoPriceD(tempVo.getInnerZdf());
                        if (zongArea.compareTo(BigDecimal.ZERO) != 0) {
                            precipitateSsdb.setSsDingBiaoPriceDjm(tempVo.getInnerZdf().divide(zongArea, 2, RoundingMode.HALF_UP));
                        }
                    }
                }
            }
            //内线合同负荷单方--在页面填写
            if (i == 2) {
                if (bdItemVo != null && bdItemVo.getSupplyCompany() == null && bdItemVo.getJieDuan() == 1) {
//                            precipitateSsdb.setBasePriceA();
//                            precipitateSsdb.setBasePriceAjm();
                }
                if (ssbdItemVo != null && ssbdItemVo.getSupplyCompany() == null && ssbdItemVo.getJieDuan() == 7) {
//                            precipitateSsdb.setSsBasePriceC();
//                            precipitateSsdb.setSsBasePriceCjm();
                }
                for (FeXiExtractingVo tempVo : sValue) {
                    if (tempVo.getSupplyCompany() != null && tempVo.getJieDuan() == 6) {
//                            precipitateSsdb.setDingBiaoPriceB();
//                            precipitateSsdb.setDingBiaoPriceBjm();
                    } else if (tempVo.getSupplyCompany() != null && tempVo.getJieDuan() == 8) {
//                            precipitateSsdb.setSsDingBiaoPriceD(tempVo.get);
//                            precipitateSsdb.setSsDingBiaoPriceDjm();
                    }
                }
            }
            if (i == 3) {
                if (bdItemVo != null && bdItemVo.getSupplyCompany() == null && bdItemVo.getJieDuan() == 1) {
                    precipitateSsdb.setBasePriceA(bdItemVo.getGygTotalPrice());
                    if (zongArea.compareTo(BigDecimal.ZERO) != 0) {
                        precipitateSsdb.setBasePriceAjm(bdItemVo.getGygTotalPrice().divide(zongArea, 2, RoundingMode.HALF_UP));
                    }
                }
                if (ssbdItemVo != null && ssbdItemVo.getSupplyCompany() == null && ssbdItemVo.getJieDuan() == 7) {
                    precipitateSsdb.setSsBasePriceC(ssbdItemVo.getGygTotalPrice());
                    if (zongArea.compareTo(BigDecimal.ZERO) != 0) {
                        precipitateSsdb.setSsBasePriceCjm(ssbdItemVo.getGygTotalPrice().divide(zongArea, 2, RoundingMode.HALF_UP));
                    }
                }
                for (FeXiExtractingVo tempVo : sValue) {
                    if (tempVo.getSupplyCompany() != null && tempVo.getJieDuan() == 6) {
                        precipitateSsdb.setDingBiaoPriceB(tempVo.getGygTotalPrice());
                        if (zongArea.compareTo(BigDecimal.ZERO) != 0) {
                            precipitateSsdb.setDingBiaoPriceBjm(tempVo.getGygTotalPrice().divide(zongArea, 2, RoundingMode.HALF_UP));
                        }
                    } else if (tempVo.getSupplyCompany() != null && tempVo.getJieDuan() == 8) {
                        precipitateSsdb.setSsDingBiaoPriceD(tempVo.getGygTotalPrice());
                        if (zongArea.compareTo(BigDecimal.ZERO) != 0) {
                            precipitateSsdb.setSsDingBiaoPriceDjm(tempVo.getGygTotalPrice().divide(zongArea, 2, RoundingMode.HALF_UP));
                        }
                    }
                }
            }
            if (i == 4) {
                if (bdItemVo != null && bdItemVo.getSupplyCompany() == null && bdItemVo.getJieDuan() == 1) {
                    precipitateSsdb.setBasePriceA(bdItemVo.getDygzzTotalPrice());
                    if (zhuZhaiArea.compareTo(BigDecimal.ZERO) != 0) {
                        precipitateSsdb.setBasePriceAjm(bdItemVo.getDygzzTotalPrice().divide(zhuZhaiArea, 2, RoundingMode.HALF_UP));
                    }
                }
                if (ssbdItemVo != null && ssbdItemVo.getSupplyCompany() == null && ssbdItemVo.getJieDuan() == 7) {
                    precipitateSsdb.setSsBasePriceC(ssbdItemVo.getDygzzTotalPrice());
                    if (zhuZhaiArea.compareTo(BigDecimal.ZERO) != 0) {
                        precipitateSsdb.setSsBasePriceCjm(ssbdItemVo.getDygzzTotalPrice().divide(zhuZhaiArea, 2, RoundingMode.HALF_UP));
                    }
                }
                for (FeXiExtractingVo tempVo : sValue) {
                    if (tempVo.getSupplyCompany() != null && tempVo.getJieDuan() == 6) {
                        precipitateSsdb.setDingBiaoPriceB(tempVo.getDygzzTotalPrice());
                        if (zhuZhaiArea.compareTo(BigDecimal.ZERO) != 0) {
                            precipitateSsdb.setDingBiaoPriceBjm(tempVo.getDygzzTotalPrice().divide(zhuZhaiArea, 2, RoundingMode.HALF_UP));
                        }
                    } else if (tempVo.getSupplyCompany() != null && tempVo.getJieDuan() == 8) {
                        precipitateSsdb.setSsDingBiaoPriceD(tempVo.getDygzzTotalPrice());
                        if (zhuZhaiArea.compareTo(BigDecimal.ZERO) != 0) {
                            precipitateSsdb.setSsDingBiaoPriceDjm(tempVo.getDygzzTotalPrice().divide(zhuZhaiArea, 2, RoundingMode.HALF_UP));
                        }
                    }
                }
            }
            if (i == 5) {
                if (bdItemVo != null && bdItemVo.getSupplyCompany() == null && bdItemVo.getJieDuan() == 1) {
                    precipitateSsdb.setBasePriceA(bdItemVo.getDygfjTotalPrice());
                    if (diXiaShiArea.compareTo(BigDecimal.ZERO) != 0) {
                        precipitateSsdb.setBasePriceAjm(bdItemVo.getDygfjTotalPrice().divide(diXiaShiArea, 2, RoundingMode.HALF_UP));
                    }
                }
                if (ssbdItemVo != null && ssbdItemVo.getSupplyCompany() == null && ssbdItemVo.getJieDuan() == 7) {
                    precipitateSsdb.setSsBasePriceC(ssbdItemVo.getDygfjTotalPrice());
                    if (diXiaShiArea.compareTo(BigDecimal.ZERO) != 0) {
                        precipitateSsdb.setSsBasePriceCjm(ssbdItemVo.getDygfjTotalPrice().divide(diXiaShiArea, 2, RoundingMode.HALF_UP));
                    }
                }
                for (FeXiExtractingVo tempVo : sValue) {
                    if (tempVo.getSupplyCompany() != null && tempVo.getJieDuan() == 6) {
                        precipitateSsdb.setDingBiaoPriceB(tempVo.getDygfjTotalPrice());
                        if (diXiaShiArea.compareTo(BigDecimal.ZERO) != 0) {
                            precipitateSsdb.setDingBiaoPriceBjm(tempVo.getDygfjTotalPrice().divide(diXiaShiArea, 2, RoundingMode.HALF_UP));
                        }
                    } else if (tempVo.getSupplyCompany() != null && tempVo.getJieDuan() == 8) {
                        precipitateSsdb.setSsDingBiaoPriceD(tempVo.getDygfjTotalPrice());
                        if (diXiaShiArea.compareTo(BigDecimal.ZERO) != 0) {
                            precipitateSsdb.setSsDingBiaoPriceDjm(tempVo.getDygfjTotalPrice().divide(diXiaShiArea, 2, RoundingMode.HALF_UP));
                        }
                    }
                }
            }
            if (i == 6) {
                if (bdItemVo != null && bdItemVo.getSupplyCompany() == null && bdItemVo.getJieDuan() == 1) {
                    precipitateSsdb.setBasePriceA(bdItemVo.getDygsyTotalPrice());
                    if (shangYeArea.compareTo(BigDecimal.ZERO) != 0) {
                        precipitateSsdb.setBasePriceAjm(bdItemVo.getDygsyTotalPrice().divide(shangYeArea, 2, RoundingMode.HALF_UP));
                    }
                }
                if (ssbdItemVo != null && ssbdItemVo.getSupplyCompany() == null && ssbdItemVo.getJieDuan() == 7) {
                    precipitateSsdb.setSsBasePriceC(ssbdItemVo.getDygsyTotalPrice());
                    if (shangYeArea.compareTo(BigDecimal.ZERO) != 0) {
                        precipitateSsdb.setSsBasePriceCjm(ssbdItemVo.getDygsyTotalPrice().divide(shangYeArea, 2, RoundingMode.HALF_UP));
                    }
                }
                for (FeXiExtractingVo tempVo : sValue) {
                    if (tempVo.getSupplyCompany() != null && tempVo.getJieDuan() == 6) {
                        precipitateSsdb.setDingBiaoPriceB(tempVo.getDygsyTotalPrice());
                        if (shangYeArea.compareTo(BigDecimal.ZERO) != 0) {
                            precipitateSsdb.setDingBiaoPriceBjm(tempVo.getDygsyTotalPrice().divide(shangYeArea, 2, RoundingMode.HALF_UP));
                        }
                    } else if (tempVo.getSupplyCompany() != null && tempVo.getJieDuan() == 8) {
                        precipitateSsdb.setSsDingBiaoPriceD(tempVo.getDygsyTotalPrice());
                        if (shangYeArea.compareTo(BigDecimal.ZERO) != 0) {
                            precipitateSsdb.setSsDingBiaoPriceDjm(tempVo.getDygsyTotalPrice().divide(shangYeArea, 2, RoundingMode.HALF_UP));
                        }
                    }
                }
            }
            if (i == 7) {
                if (bdItemVo != null && bdItemVo.getSupplyCompany() == null && bdItemVo.getJieDuan() == 1) {
                    precipitateSsdb.setBasePriceA(bdItemVo.getDygcdzTotalPrice());
                    if (diXiaShiArea.compareTo(BigDecimal.ZERO) != 0) {
                        precipitateSsdb.setBasePriceAjm(bdItemVo.getDygcdzTotalPrice().divide(diXiaShiArea, 2, RoundingMode.HALF_UP));
                    }
                }
                if (ssbdItemVo != null && ssbdItemVo.getSupplyCompany() == null && ssbdItemVo.getJieDuan() == 7) {
                    precipitateSsdb.setSsBasePriceC(ssbdItemVo.getDygcdzTotalPrice());
                    if (diXiaShiArea.compareTo(BigDecimal.ZERO) != 0) {
                        precipitateSsdb.setSsBasePriceCjm(ssbdItemVo.getDygcdzTotalPrice().divide(diXiaShiArea, 2, RoundingMode.HALF_UP));
                    }
                }
                for (FeXiExtractingVo tempVo : sValue) {
                    if (tempVo.getSupplyCompany() != null && tempVo.getJieDuan() == 6) {
                        precipitateSsdb.setDingBiaoPriceB(tempVo.getDygcdzTotalPrice());
                        if (diXiaShiArea.compareTo(BigDecimal.ZERO) != 0) {
                            precipitateSsdb.setDingBiaoPriceBjm(tempVo.getDygcdzTotalPrice().divide(diXiaShiArea, 2, RoundingMode.HALF_UP));
                        }
                    } else if (tempVo.getSupplyCompany() != null && tempVo.getJieDuan() == 8) {
                        precipitateSsdb.setSsDingBiaoPriceD(tempVo.getDygcdzTotalPrice());
                        if (diXiaShiArea.compareTo(BigDecimal.ZERO) != 0) {
                            precipitateSsdb.setSsDingBiaoPriceDjm(tempVo.getDygcdzTotalPrice().divide(diXiaShiArea, 2, RoundingMode.HALF_UP));
                        }
                    }
                }
            }
            if (i == 8) {
                if (bdItemVo != null && bdItemVo.getSupplyCompany() == null && bdItemVo.getJieDuan() == 1) {
                    precipitateSsdb.setBasePriceA(bdItemVo.getDygTotalPriceCount());
                    BigDecimal tempDygzzTotalPrice = BigDecimal.ZERO;
                    BigDecimal tempDygfjTotalPrice = BigDecimal.ZERO;
                    BigDecimal tempDygsyTotalPrice = BigDecimal.ZERO;
                    BigDecimal tempDygcdzTotalPrice = BigDecimal.ZERO;
                    if (zhuZhaiArea.compareTo(BigDecimal.ZERO) != 0) {
                        tempDygzzTotalPrice = bdItemVo.getDygzzTotalPrice().divide(zhuZhaiArea, 2, RoundingMode.HALF_UP);
                    }
                    if (diXiaShiArea.compareTo(BigDecimal.ZERO) != 0) {
                        tempDygfjTotalPrice = bdItemVo.getDygfjTotalPrice().divide(diXiaShiArea, 2, RoundingMode.HALF_UP);
                        tempDygcdzTotalPrice = bdItemVo.getDygcdzTotalPrice().divide(diXiaShiArea, 2, RoundingMode.HALF_UP);
                    }
                    if (shangYeArea.compareTo(BigDecimal.ZERO) != 0) {
                        tempDygsyTotalPrice = bdItemVo.getDygsyTotalPrice().divide(shangYeArea, 2, RoundingMode.HALF_UP);
                    }
                    precipitateSsdb.setBasePriceAjm(tempDygzzTotalPrice.add(tempDygfjTotalPrice).add(tempDygsyTotalPrice).add(tempDygcdzTotalPrice));
                }
                if (ssbdItemVo != null && ssbdItemVo.getSupplyCompany() == null && ssbdItemVo.getJieDuan() == 7) {
                    precipitateSsdb.setSsBasePriceC(ssbdItemVo.getDygTotalPriceCount());
                    BigDecimal tempDygzzTotalPrice = BigDecimal.ZERO;
                    BigDecimal tempDygfjTotalPrice = BigDecimal.ZERO;
                    BigDecimal tempDygsyTotalPrice = BigDecimal.ZERO;
                    BigDecimal tempDygcdzTotalPrice = BigDecimal.ZERO;
                    if (zhuZhaiArea.compareTo(BigDecimal.ZERO) != 0) {
                        tempDygzzTotalPrice = ssbdItemVo.getDygzzTotalPrice().divide(zhuZhaiArea, 2, RoundingMode.HALF_UP);
                    }
                    if (diXiaShiArea.compareTo(BigDecimal.ZERO) != 0) {
                        tempDygfjTotalPrice = ssbdItemVo.getDygfjTotalPrice().divide(diXiaShiArea, 2, RoundingMode.HALF_UP);
                        tempDygcdzTotalPrice = ssbdItemVo.getDygcdzTotalPrice().divide(diXiaShiArea, 2, RoundingMode.HALF_UP);
                    }
                    if (shangYeArea.compareTo(BigDecimal.ZERO) != 0) {
                        tempDygsyTotalPrice = ssbdItemVo.getDygsyTotalPrice().divide(shangYeArea, 2, RoundingMode.HALF_UP);
                    }
                    precipitateSsdb.setSsBasePriceCjm(tempDygzzTotalPrice.add(tempDygfjTotalPrice).add(tempDygsyTotalPrice).add(tempDygcdzTotalPrice));
                }
                for (FeXiExtractingVo tempVo : sValue) {
                    if (tempVo.getSupplyCompany() != null && tempVo.getJieDuan() == 6) {
                        precipitateSsdb.setDingBiaoPriceB(tempVo.getDygTotalPriceCount());
                        BigDecimal tempDygzzTotalPrice = BigDecimal.ZERO;
                        BigDecimal tempDygfjTotalPrice = BigDecimal.ZERO;
                        BigDecimal tempDygsyTotalPrice = BigDecimal.ZERO;
                        BigDecimal tempDygcdzTotalPrice = BigDecimal.ZERO;
                        if (zhuZhaiArea.compareTo(BigDecimal.ZERO) != 0) {
                            tempDygzzTotalPrice = tempVo.getDygzzTotalPrice().divide(zhuZhaiArea, 2, RoundingMode.HALF_UP);
                        }
                        if (diXiaShiArea.compareTo(BigDecimal.ZERO) != 0) {
                            tempDygfjTotalPrice = tempVo.getDygfjTotalPrice().divide(diXiaShiArea, 2, RoundingMode.HALF_UP);
                            tempDygcdzTotalPrice = tempVo.getDygcdzTotalPrice().divide(diXiaShiArea, 2, RoundingMode.HALF_UP);
                        }
                        if (shangYeArea.compareTo(BigDecimal.ZERO) != 0) {
                            tempDygsyTotalPrice = tempVo.getDygsyTotalPrice().divide(shangYeArea, 2, RoundingMode.HALF_UP);
                        }
                        precipitateSsdb.setDingBiaoPriceBjm(tempDygzzTotalPrice.add(tempDygfjTotalPrice).add(tempDygsyTotalPrice).add(tempDygcdzTotalPrice));
                    } else if (tempVo.getSupplyCompany() != null && tempVo.getJieDuan() == 8) {
                        precipitateSsdb.setSsDingBiaoPriceD(tempVo.getDygTotalPriceCount());
                        BigDecimal tempDygzzTotalPrice = BigDecimal.ZERO;
                        BigDecimal tempDygfjTotalPrice = BigDecimal.ZERO;
                        BigDecimal tempDygsyTotalPrice = BigDecimal.ZERO;
                        BigDecimal tempDygcdzTotalPrice = BigDecimal.ZERO;
                        if (zhuZhaiArea.compareTo(BigDecimal.ZERO) != 0) {
                            tempDygzzTotalPrice = tempVo.getDygzzTotalPrice().divide(zhuZhaiArea, 2, RoundingMode.HALF_UP);
                        }
                        if (diXiaShiArea.compareTo(BigDecimal.ZERO) != 0) {
                            tempDygfjTotalPrice = tempVo.getDygfjTotalPrice().divide(diXiaShiArea, 2, RoundingMode.HALF_UP);
                            tempDygcdzTotalPrice = tempVo.getDygcdzTotalPrice().divide(diXiaShiArea, 2, RoundingMode.HALF_UP);
                        }
                        if (shangYeArea.compareTo(BigDecimal.ZERO) != 0) {
                            tempDygsyTotalPrice = tempVo.getDygsyTotalPrice().divide(shangYeArea, 2, RoundingMode.HALF_UP);
                        }
                        precipitateSsdb.setSsDingBiaoPriceDjm(tempDygzzTotalPrice.add(tempDygfjTotalPrice).add(tempDygsyTotalPrice).add(tempDygcdzTotalPrice));
                    }
                }
            }
            if (i == 9) {
                if (bdItemVo != null && bdItemVo.getSupplyCompany() == null && bdItemVo.getJieDuan() == 1) {
                    precipitateSsdb.setBasePriceA(bdItemVo.getByqzzTotalPrice());
                    if (zhuZhaiArea.compareTo(BigDecimal.ZERO) != 0) {
                        precipitateSsdb.setBasePriceAjm(bdItemVo.getByqzzTotalPrice().divide(zhuZhaiArea, 2, RoundingMode.HALF_UP));
                    }
                }
                if (ssbdItemVo != null && ssbdItemVo.getSupplyCompany() == null && ssbdItemVo.getJieDuan() == 7) {
                    precipitateSsdb.setSsBasePriceC(ssbdItemVo.getByqzzTotalPrice());
                    if (zhuZhaiArea.compareTo(BigDecimal.ZERO) != 0) {
                        precipitateSsdb.setSsBasePriceCjm(ssbdItemVo.getByqzzTotalPrice().divide(zhuZhaiArea, 2, RoundingMode.HALF_UP));
                    }
                }
                for (FeXiExtractingVo tempVo : sValue) {
                    if (tempVo.getSupplyCompany() != null && tempVo.getJieDuan() == 6) {
                        precipitateSsdb.setDingBiaoPriceB(tempVo.getByqzzTotalPrice());
                        if (zhuZhaiArea.compareTo(BigDecimal.ZERO) != 0) {
                            precipitateSsdb.setDingBiaoPriceBjm(tempVo.getByqzzTotalPrice().divide(zhuZhaiArea, 2, RoundingMode.HALF_UP));
                        }
                    } else if (tempVo.getSupplyCompany() != null && tempVo.getJieDuan() == 8) {
                        precipitateSsdb.setSsDingBiaoPriceD(tempVo.getByqzzTotalPrice());
                        if (zhuZhaiArea.compareTo(BigDecimal.ZERO) != 0) {
                            precipitateSsdb.setSsDingBiaoPriceDjm(tempVo.getByqzzTotalPrice().divide(zhuZhaiArea, 2, RoundingMode.HALF_UP));
                        }
                    }
                }
            }
            if (i == 10) {
                if (bdItemVo != null && bdItemVo.getSupplyCompany() == null && bdItemVo.getJieDuan() == 1) {
                    precipitateSsdb.setBasePriceA(bdItemVo.getByqfjTotalPrice());
                    if (diXiaShiArea.compareTo(BigDecimal.ZERO) != 0) {
                        precipitateSsdb.setBasePriceAjm(bdItemVo.getByqfjTotalPrice().divide(diXiaShiArea, 2, RoundingMode.HALF_UP));
                    }
                }
                if (ssbdItemVo != null && ssbdItemVo.getSupplyCompany() == null && ssbdItemVo.getJieDuan() == 7) {
                    precipitateSsdb.setSsBasePriceC(ssbdItemVo.getByqfjTotalPrice());
                    if (diXiaShiArea.compareTo(BigDecimal.ZERO) != 0) {
                        precipitateSsdb.setSsBasePriceCjm(ssbdItemVo.getByqfjTotalPrice().divide(diXiaShiArea, 2, RoundingMode.HALF_UP));
                    }
                }
                for (FeXiExtractingVo tempVo : sValue) {
                    if (tempVo.getSupplyCompany() != null && tempVo.getJieDuan() == 6) {
                        precipitateSsdb.setDingBiaoPriceB(tempVo.getByqfjTotalPrice());
                        if (diXiaShiArea.compareTo(BigDecimal.ZERO) != 0) {
                            precipitateSsdb.setDingBiaoPriceBjm(tempVo.getByqfjTotalPrice().divide(diXiaShiArea, 2, RoundingMode.HALF_UP));
                        }
                    } else if (tempVo.getSupplyCompany() != null && tempVo.getJieDuan() == 8) {
                        precipitateSsdb.setSsDingBiaoPriceD(tempVo.getByqfjTotalPrice());
                        if (diXiaShiArea.compareTo(BigDecimal.ZERO) != 0) {
                            precipitateSsdb.setSsDingBiaoPriceDjm(tempVo.getByqfjTotalPrice().divide(diXiaShiArea, 2, RoundingMode.HALF_UP));
                        }
                    }
                }
            }
            if (i == 11) {
                if (bdItemVo != null && bdItemVo.getSupplyCompany() == null && bdItemVo.getJieDuan() == 1) {
                    precipitateSsdb.setBasePriceA(bdItemVo.getByqsyTotalPrice());
                    if (shangYeArea.compareTo(BigDecimal.ZERO) != 0) {
                        precipitateSsdb.setBasePriceAjm(bdItemVo.getByqsyTotalPrice().divide(shangYeArea, 2, RoundingMode.HALF_UP));
                    }
                }
                if (ssbdItemVo != null && ssbdItemVo.getSupplyCompany() == null && ssbdItemVo.getJieDuan() == 7) {
                    precipitateSsdb.setSsBasePriceC(ssbdItemVo.getByqsyTotalPrice());
                    if (shangYeArea.compareTo(BigDecimal.ZERO) != 0) {
                        precipitateSsdb.setSsBasePriceCjm(ssbdItemVo.getByqsyTotalPrice().divide(shangYeArea, 2, RoundingMode.HALF_UP));
                    }
                }
                for (FeXiExtractingVo tempVo : sValue) {
                    if (tempVo.getSupplyCompany() != null && tempVo.getJieDuan() == 6) {
                        precipitateSsdb.setDingBiaoPriceB(tempVo.getByqsyTotalPrice());
                        if (shangYeArea.compareTo(BigDecimal.ZERO) != 0) {
                            precipitateSsdb.setDingBiaoPriceBjm(tempVo.getByqsyTotalPrice().divide(shangYeArea, 2, RoundingMode.HALF_UP));
                        }
                    } else if (tempVo.getSupplyCompany() != null && tempVo.getJieDuan() == 8) {
                        precipitateSsdb.setSsDingBiaoPriceD(tempVo.getByqsyTotalPrice());
                        if (shangYeArea.compareTo(BigDecimal.ZERO) != 0) {
                            precipitateSsdb.setSsDingBiaoPriceDjm(tempVo.getByqsyTotalPrice().divide(shangYeArea, 2, RoundingMode.HALF_UP));
                        }
                    }
                }
            }
            if (i == 12) {
                if (bdItemVo != null && bdItemVo.getSupplyCompany() == null && bdItemVo.getJieDuan() == 1) {
                    precipitateSsdb.setBasePriceA(bdItemVo.getByqcdzTotalPrice());
                    if (diXiaShiArea.compareTo(BigDecimal.ZERO) != 0) {
                        precipitateSsdb.setBasePriceAjm(bdItemVo.getByqcdzTotalPrice().divide(diXiaShiArea, 2, RoundingMode.HALF_UP));
                    }
                }
                if (ssbdItemVo != null && ssbdItemVo.getSupplyCompany() == null && ssbdItemVo.getJieDuan() == 7) {
                    precipitateSsdb.setSsBasePriceC(ssbdItemVo.getByqcdzTotalPrice());
                    if (diXiaShiArea.compareTo(BigDecimal.ZERO) != 0) {
                        precipitateSsdb.setSsBasePriceCjm(ssbdItemVo.getByqcdzTotalPrice().divide(diXiaShiArea, 2, RoundingMode.HALF_UP));
                    }
                }
                for (FeXiExtractingVo tempVo : sValue) {
                    if (tempVo.getSupplyCompany() != null && tempVo.getJieDuan() == 6) {
                        precipitateSsdb.setDingBiaoPriceB(tempVo.getByqcdzTotalPrice());
                        if (diXiaShiArea.compareTo(BigDecimal.ZERO) != 0) {
                            precipitateSsdb.setDingBiaoPriceBjm(tempVo.getByqcdzTotalPrice().divide(diXiaShiArea, 2, RoundingMode.HALF_UP));
                        }
                    } else if (tempVo.getSupplyCompany() != null && tempVo.getJieDuan() == 8) {
                        precipitateSsdb.setSsDingBiaoPriceD(tempVo.getByqcdzTotalPrice());
                        if (diXiaShiArea.compareTo(BigDecimal.ZERO) != 0) {
                            precipitateSsdb.setSsDingBiaoPriceDjm(tempVo.getByqcdzTotalPrice().divide(diXiaShiArea, 2, RoundingMode.HALF_UP));
                        }
                    }
                }
            }
            if (i == 13) {
                if (bdItemVo != null && bdItemVo.getSupplyCompany() == null && bdItemVo.getJieDuan() == 1) {
                    precipitateSsdb.setBasePriceA(bdItemVo.getByqTotalPriceCount());
                    BigDecimal tempByqzzTotalPrice = BigDecimal.ZERO;
                    BigDecimal tempByqfjTotalPrice = BigDecimal.ZERO;
                    BigDecimal tempByqsyTotalPrice = BigDecimal.ZERO;
                    BigDecimal tempByqcdzTotalPrice = BigDecimal.ZERO;
                    if (zhuZhaiArea.compareTo(BigDecimal.ZERO) != 0) {
                        tempByqzzTotalPrice = bdItemVo.getByqzzTotalPrice().divide(zhuZhaiArea, 2, RoundingMode.HALF_UP);
                    }
                    if (diXiaShiArea.compareTo(BigDecimal.ZERO) != 0) {
                        tempByqfjTotalPrice = bdItemVo.getByqfjTotalPrice().divide(diXiaShiArea, 2, RoundingMode.HALF_UP);
                        tempByqcdzTotalPrice = bdItemVo.getByqcdzTotalPrice().divide(diXiaShiArea, 2, RoundingMode.HALF_UP);
                    }
                    if (shangYeArea.compareTo(BigDecimal.ZERO) != 0) {
                        tempByqsyTotalPrice = bdItemVo.getByqsyTotalPrice().divide(shangYeArea, 2, RoundingMode.HALF_UP);
                    }
                    precipitateSsdb.setBasePriceAjm(tempByqzzTotalPrice.add(tempByqfjTotalPrice).add(tempByqsyTotalPrice).add(tempByqcdzTotalPrice));
                }
                if (ssbdItemVo != null && ssbdItemVo.getSupplyCompany() == null && ssbdItemVo.getJieDuan() == 7) {
                    precipitateSsdb.setSsBasePriceC(ssbdItemVo.getByqTotalPriceCount());
                    BigDecimal tempByqzzTotalPrice = BigDecimal.ZERO;
                    BigDecimal tempByqfjTotalPrice = BigDecimal.ZERO;
                    BigDecimal tempByqsyTotalPrice = BigDecimal.ZERO;
                    BigDecimal tempByqcdzTotalPrice = BigDecimal.ZERO;
                    if (zhuZhaiArea.compareTo(BigDecimal.ZERO) != 0) {
                        tempByqzzTotalPrice = ssbdItemVo.getByqzzTotalPrice().divide(zhuZhaiArea, 2, RoundingMode.HALF_UP);
                    }
                    if (diXiaShiArea.compareTo(BigDecimal.ZERO) != 0) {
                        tempByqfjTotalPrice = ssbdItemVo.getByqfjTotalPrice().divide(diXiaShiArea, 2, RoundingMode.HALF_UP);
                        tempByqcdzTotalPrice = ssbdItemVo.getByqcdzTotalPrice().divide(diXiaShiArea, 2, RoundingMode.HALF_UP);
                    }
                    if (shangYeArea.compareTo(BigDecimal.ZERO) != 0) {
                        tempByqsyTotalPrice = ssbdItemVo.getByqsyTotalPrice().divide(shangYeArea, 2, RoundingMode.HALF_UP);
                    }
                    precipitateSsdb.setSsBasePriceCjm(tempByqzzTotalPrice.add(tempByqfjTotalPrice).add(tempByqsyTotalPrice).add(tempByqcdzTotalPrice));
                }
                for (FeXiExtractingVo tempVo : sValue) {
                    if (tempVo.getSupplyCompany() != null && tempVo.getJieDuan() == 6) {
                        precipitateSsdb.setDingBiaoPriceB(tempVo.getByqTotalPriceCount());
                        BigDecimal tempByqzzTotalPrice = BigDecimal.ZERO;
                        BigDecimal tempByqfjTotalPrice = BigDecimal.ZERO;
                        BigDecimal tempByqsyTotalPrice = BigDecimal.ZERO;
                        BigDecimal tempByqcdzTotalPrice = BigDecimal.ZERO;
                        if (zhuZhaiArea.compareTo(BigDecimal.ZERO) != 0) {
                            tempByqzzTotalPrice = tempVo.getByqzzTotalPrice().divide(zhuZhaiArea, 2, RoundingMode.HALF_UP);
                        }
                        if (diXiaShiArea.compareTo(BigDecimal.ZERO) != 0) {
                            tempByqfjTotalPrice = tempVo.getByqfjTotalPrice().divide(diXiaShiArea, 2, RoundingMode.HALF_UP);
                            tempByqcdzTotalPrice = tempVo.getByqcdzTotalPrice().divide(diXiaShiArea, 2, RoundingMode.HALF_UP);
                        }
                        if (shangYeArea.compareTo(BigDecimal.ZERO) != 0) {
                            tempByqsyTotalPrice = tempVo.getByqsyTotalPrice().divide(shangYeArea, 2, RoundingMode.HALF_UP);
                        }
                        precipitateSsdb.setDingBiaoPriceBjm(tempByqzzTotalPrice.add(tempByqfjTotalPrice).add(tempByqsyTotalPrice).add(tempByqcdzTotalPrice));
                    } else if (tempVo.getSupplyCompany() != null && tempVo.getJieDuan() == 8) {
                        precipitateSsdb.setSsDingBiaoPriceD(tempVo.getByqTotalPriceCount());
                        BigDecimal tempByqzzTotalPrice = BigDecimal.ZERO;
                        BigDecimal tempByqfjTotalPrice = BigDecimal.ZERO;
                        BigDecimal tempByqsyTotalPrice = BigDecimal.ZERO;
                        BigDecimal tempByqcdzTotalPrice = BigDecimal.ZERO;
                        if (zhuZhaiArea.compareTo(BigDecimal.ZERO) != 0) {
                            tempByqzzTotalPrice = tempVo.getByqzzTotalPrice().divide(zhuZhaiArea, 2, RoundingMode.HALF_UP);
                        }
                        if (diXiaShiArea.compareTo(BigDecimal.ZERO) != 0) {
                            tempByqfjTotalPrice = tempVo.getByqfjTotalPrice().divide(diXiaShiArea, 2, RoundingMode.HALF_UP);
                            tempByqcdzTotalPrice = tempVo.getByqcdzTotalPrice().divide(diXiaShiArea, 2, RoundingMode.HALF_UP);
                        }
                        if (shangYeArea.compareTo(BigDecimal.ZERO) != 0) {
                            tempByqsyTotalPrice = tempVo.getByqsyTotalPrice().divide(shangYeArea, 2, RoundingMode.HALF_UP);
                        }
                        precipitateSsdb.setSsDingBiaoPriceDjm(tempByqzzTotalPrice.add(tempByqfjTotalPrice).add(tempByqsyTotalPrice).add(tempByqcdzTotalPrice));
                    }
                }
            }
            if (i == 14) {
                if (bdItemVo != null && bdItemVo.getSupplyCompany() == null && bdItemVo.getJieDuan() == 1) {
                    precipitateSsdb.setBasePriceA(bdItemVo.getDbzzTotalPrice());
                    if (zhuZhaiArea.compareTo(BigDecimal.ZERO) != 0) {
                        precipitateSsdb.setBasePriceAjm(bdItemVo.getDbzzTotalPrice().divide(zhuZhaiArea, 2, RoundingMode.HALF_UP));
                    }
                }
                if (ssbdItemVo != null && ssbdItemVo.getSupplyCompany() == null && ssbdItemVo.getJieDuan() == 7) {
                    precipitateSsdb.setSsBasePriceC(ssbdItemVo.getDbzzTotalPrice());
                    if (zhuZhaiArea.compareTo(BigDecimal.ZERO) != 0) {
                        precipitateSsdb.setSsBasePriceCjm(ssbdItemVo.getDbzzTotalPrice().divide(zhuZhaiArea, 2, RoundingMode.HALF_UP));
                    }
                }
                for (FeXiExtractingVo tempVo : sValue) {
                    if (tempVo.getSupplyCompany() != null && tempVo.getJieDuan() == 6) {
                        precipitateSsdb.setDingBiaoPriceB(tempVo.getDbzzTotalPrice());
                        if (zhuZhaiArea.compareTo(BigDecimal.ZERO) != 0) {
                            precipitateSsdb.setDingBiaoPriceBjm(tempVo.getDbzzTotalPrice().divide(zhuZhaiArea, 2, RoundingMode.HALF_UP));
                        }
                    } else if (tempVo.getSupplyCompany() != null && tempVo.getJieDuan() == 8) {
                        precipitateSsdb.setSsDingBiaoPriceD(tempVo.getDbzzTotalPrice());
                        if (zhuZhaiArea.compareTo(BigDecimal.ZERO) != 0) {
                            precipitateSsdb.setSsDingBiaoPriceDjm(tempVo.getDbzzTotalPrice().divide(zhuZhaiArea, 2, RoundingMode.HALF_UP));
                        }
                    }
                }
            }
            if (i == 15) {
                if (bdItemVo != null && bdItemVo.getSupplyCompany() == null && bdItemVo.getJieDuan() == 1) {
                    precipitateSsdb.setBasePriceA(bdItemVo.getDbfjTotalPrice());
                    if (diXiaShiArea.compareTo(BigDecimal.ZERO) != 0) {
                        precipitateSsdb.setBasePriceAjm(bdItemVo.getDbfjTotalPrice().divide(diXiaShiArea, 2, RoundingMode.HALF_UP));
                    }
                }
                if (ssbdItemVo != null && ssbdItemVo.getSupplyCompany() == null && ssbdItemVo.getJieDuan() == 7) {
                    precipitateSsdb.setSsBasePriceC(ssbdItemVo.getDbfjTotalPrice());
                    if (diXiaShiArea.compareTo(BigDecimal.ZERO) != 0) {
                        precipitateSsdb.setSsBasePriceCjm(ssbdItemVo.getDbfjTotalPrice().divide(diXiaShiArea, 2, RoundingMode.HALF_UP));
                    }
                }
                for (FeXiExtractingVo tempVo : sValue) {
                    if (tempVo.getSupplyCompany() != null && tempVo.getJieDuan() == 6) {
                        precipitateSsdb.setDingBiaoPriceB(tempVo.getDbfjTotalPrice());
                        if (diXiaShiArea.compareTo(BigDecimal.ZERO) != 0) {
                            precipitateSsdb.setDingBiaoPriceBjm(tempVo.getDbfjTotalPrice().divide(diXiaShiArea, 2, RoundingMode.HALF_UP));
                        }
                    } else if (tempVo.getSupplyCompany() != null && tempVo.getJieDuan() == 8) {
                        precipitateSsdb.setSsDingBiaoPriceD(tempVo.getDbfjTotalPrice());
                        if (diXiaShiArea.compareTo(BigDecimal.ZERO) != 0) {
                            precipitateSsdb.setSsDingBiaoPriceDjm(tempVo.getDbfjTotalPrice().divide(diXiaShiArea, 2, RoundingMode.HALF_UP));
                        }
                    }
                }
            }
            if (i == 16) {
                if (bdItemVo != null && bdItemVo.getSupplyCompany() == null && bdItemVo.getJieDuan() == 1) {
                    precipitateSsdb.setBasePriceA(bdItemVo.getDbsyTotalPrice());
                    if (shangYeArea.compareTo(BigDecimal.ZERO) != 0) {
                        precipitateSsdb.setBasePriceAjm(bdItemVo.getDbsyTotalPrice().divide(shangYeArea, 2, RoundingMode.HALF_UP));
                    }
                }
                if (ssbdItemVo != null && ssbdItemVo.getSupplyCompany() == null && ssbdItemVo.getJieDuan() == 7) {
                    precipitateSsdb.setSsBasePriceC(ssbdItemVo.getDbsyTotalPrice());
                    if (shangYeArea.compareTo(BigDecimal.ZERO) != 0) {
                        precipitateSsdb.setSsBasePriceCjm(ssbdItemVo.getDbsyTotalPrice().divide(shangYeArea, 2, RoundingMode.HALF_UP));
                    }
                }
                for (FeXiExtractingVo tempVo : sValue) {
                    if (tempVo.getSupplyCompany() != null && tempVo.getJieDuan() == 6) {
                        precipitateSsdb.setDingBiaoPriceB(tempVo.getDbsyTotalPrice());
                        if (shangYeArea.compareTo(BigDecimal.ZERO) != 0) {
                            precipitateSsdb.setDingBiaoPriceBjm(tempVo.getDbsyTotalPrice().divide(shangYeArea, 2, RoundingMode.HALF_UP));
                        }
                    } else if (tempVo.getSupplyCompany() != null && tempVo.getJieDuan() == 8) {
                        precipitateSsdb.setSsDingBiaoPriceD(tempVo.getDbsyTotalPrice());
                        if (shangYeArea.compareTo(BigDecimal.ZERO) != 0) {
                            precipitateSsdb.setSsDingBiaoPriceDjm(tempVo.getDbsyTotalPrice().divide(shangYeArea, 2, RoundingMode.HALF_UP));
                        }
                    }
                }
            }
            if (i == 17) {
                if (bdItemVo != null && bdItemVo.getSupplyCompany() == null && bdItemVo.getJieDuan() == 1) {
                    precipitateSsdb.setBasePriceA(bdItemVo.getDbcdzTotalPrice());
                    if (diXiaShiArea.compareTo(BigDecimal.ZERO) != 0) {
                        precipitateSsdb.setBasePriceAjm(bdItemVo.getDbcdzTotalPrice().divide(diXiaShiArea, 2, RoundingMode.HALF_UP));
                    }
                }
                if (ssbdItemVo != null && ssbdItemVo.getSupplyCompany() == null && ssbdItemVo.getJieDuan() == 7) {
                    precipitateSsdb.setSsBasePriceC(ssbdItemVo.getDbcdzTotalPrice());
                    if (diXiaShiArea.compareTo(BigDecimal.ZERO) != 0) {
                        precipitateSsdb.setSsBasePriceCjm(ssbdItemVo.getDbcdzTotalPrice().divide(diXiaShiArea, 2, RoundingMode.HALF_UP));
                    }
                }
                for (FeXiExtractingVo tempVo : sValue) {
                    if (tempVo.getSupplyCompany() != null && tempVo.getJieDuan() == 6) {
                        precipitateSsdb.setDingBiaoPriceB(tempVo.getDbcdzTotalPrice());
                        if (diXiaShiArea.compareTo(BigDecimal.ZERO) != 0) {
                            precipitateSsdb.setDingBiaoPriceBjm(tempVo.getDbcdzTotalPrice().divide(diXiaShiArea, 2, RoundingMode.HALF_UP));
                        }
                    } else if (tempVo.getSupplyCompany() != null && tempVo.getJieDuan() == 8) {
                        precipitateSsdb.setSsDingBiaoPriceD(tempVo.getDbcdzTotalPrice());
                        if (diXiaShiArea.compareTo(BigDecimal.ZERO) != 0) {
                            precipitateSsdb.setSsDingBiaoPriceDjm(tempVo.getDbcdzTotalPrice().divide(diXiaShiArea, 2, RoundingMode.HALF_UP));
                        }
                    }
                }
            }
            if (i == 18) {
                if (bdItemVo != null && bdItemVo.getSupplyCompany() == null && bdItemVo.getJieDuan() == 1) {
                    precipitateSsdb.setBasePriceA(bdItemVo.getDbTotalPriceCount());
                    BigDecimal tempDbzzTotalPrice = BigDecimal.ZERO;
                    BigDecimal tempDbfjTotalPrice = BigDecimal.ZERO;
                    BigDecimal tempDbsyTotalPrice = BigDecimal.ZERO;
                    BigDecimal tempDbcdzTotalPrice = BigDecimal.ZERO;
                    if (zhuZhaiArea.compareTo(BigDecimal.ZERO) != 0) {
                        tempDbzzTotalPrice = bdItemVo.getDbzzTotalPrice().divide(zhuZhaiArea, 2, RoundingMode.HALF_UP);
                    }
                    if (diXiaShiArea.compareTo(BigDecimal.ZERO) != 0) {
                        tempDbfjTotalPrice = bdItemVo.getDbfjTotalPrice().divide(diXiaShiArea, 2, RoundingMode.HALF_UP);
                        tempDbcdzTotalPrice = bdItemVo.getDbcdzTotalPrice().divide(diXiaShiArea, 2, RoundingMode.HALF_UP);
                    }
                    if (shangYeArea.compareTo(BigDecimal.ZERO) != 0) {
                        tempDbsyTotalPrice = bdItemVo.getDbsyTotalPrice().divide(shangYeArea, 2, RoundingMode.HALF_UP);
                    }
                    precipitateSsdb.setBasePriceAjm(tempDbzzTotalPrice.add(tempDbfjTotalPrice).add(tempDbsyTotalPrice).add(tempDbcdzTotalPrice));
                }
                if (ssbdItemVo != null && ssbdItemVo.getSupplyCompany() == null && ssbdItemVo.getJieDuan() == 7) {
                    precipitateSsdb.setSsBasePriceC(ssbdItemVo.getDbTotalPriceCount());
                    BigDecimal tempDbzzTotalPrice = BigDecimal.ZERO;
                    BigDecimal tempDbfjTotalPrice = BigDecimal.ZERO;
                    BigDecimal tempDbsyTotalPrice = BigDecimal.ZERO;
                    BigDecimal tempDbcdzTotalPrice = BigDecimal.ZERO;
                    if (zhuZhaiArea.compareTo(BigDecimal.ZERO) != 0) {
                        tempDbzzTotalPrice = ssbdItemVo.getDbzzTotalPrice().divide(zhuZhaiArea, 2, RoundingMode.HALF_UP);
                    }
                    if (diXiaShiArea.compareTo(BigDecimal.ZERO) != 0) {
                        tempDbfjTotalPrice = ssbdItemVo.getDbfjTotalPrice().divide(diXiaShiArea, 2, RoundingMode.HALF_UP);
                        tempDbcdzTotalPrice = ssbdItemVo.getDbcdzTotalPrice().divide(diXiaShiArea, 2, RoundingMode.HALF_UP);
                    }
                    if (shangYeArea.compareTo(BigDecimal.ZERO) != 0) {
                        tempDbsyTotalPrice = ssbdItemVo.getDbsyTotalPrice().divide(shangYeArea, 2, RoundingMode.HALF_UP);
                    }
                    precipitateSsdb.setSsBasePriceCjm(tempDbzzTotalPrice.add(tempDbfjTotalPrice).add(tempDbsyTotalPrice).add(tempDbcdzTotalPrice));
                }
                for (FeXiExtractingVo tempVo : sValue) {
                    if (tempVo.getSupplyCompany() != null && tempVo.getJieDuan() == 6) {
                        precipitateSsdb.setDingBiaoPriceB(tempVo.getDbTotalPriceCount());
                        BigDecimal tempDbzzTotalPrice = BigDecimal.ZERO;
                        BigDecimal tempDbfjTotalPrice = BigDecimal.ZERO;
                        BigDecimal tempDbsyTotalPrice = BigDecimal.ZERO;
                        BigDecimal tempDbcdzTotalPrice = BigDecimal.ZERO;
                        if (zhuZhaiArea.compareTo(BigDecimal.ZERO) != 0) {
                            tempDbzzTotalPrice = tempVo.getDbzzTotalPrice().divide(zhuZhaiArea, 2, RoundingMode.HALF_UP);
                        }
                        if (diXiaShiArea.compareTo(BigDecimal.ZERO) != 0) {
                            tempDbfjTotalPrice = tempVo.getDbfjTotalPrice().divide(diXiaShiArea, 2, RoundingMode.HALF_UP);
                            tempDbcdzTotalPrice = tempVo.getDbcdzTotalPrice().divide(diXiaShiArea, 2, RoundingMode.HALF_UP);
                        }
                        if (shangYeArea.compareTo(BigDecimal.ZERO) != 0) {
                            tempDbsyTotalPrice = tempVo.getDbsyTotalPrice().divide(shangYeArea, 2, RoundingMode.HALF_UP);
                        }
                        precipitateSsdb.setDingBiaoPriceBjm(tempDbzzTotalPrice.add(tempDbfjTotalPrice).add(tempDbsyTotalPrice).add(tempDbcdzTotalPrice));
                    } else if (tempVo.getSupplyCompany() != null && tempVo.getJieDuan() == 8) {
                        precipitateSsdb.setSsDingBiaoPriceD(tempVo.getDbTotalPriceCount());
                        BigDecimal tempDbzzTotalPrice = BigDecimal.ZERO;
                        BigDecimal tempDbfjTotalPrice = BigDecimal.ZERO;
                        BigDecimal tempDbsyTotalPrice = BigDecimal.ZERO;
                        BigDecimal tempDbcdzTotalPrice = BigDecimal.ZERO;
                        if (zhuZhaiArea.compareTo(BigDecimal.ZERO) != 0) {
                            tempDbzzTotalPrice = tempVo.getDbzzTotalPrice().divide(zhuZhaiArea, 2, RoundingMode.HALF_UP);
                        }
                        if (diXiaShiArea.compareTo(BigDecimal.ZERO) != 0) {
                            tempDbfjTotalPrice = tempVo.getDbfjTotalPrice().divide(diXiaShiArea, 2, RoundingMode.HALF_UP);
                            tempDbcdzTotalPrice = tempVo.getDbcdzTotalPrice().divide(diXiaShiArea, 2, RoundingMode.HALF_UP);
                        }
                        if (shangYeArea.compareTo(BigDecimal.ZERO) != 0) {
                            tempDbsyTotalPrice = tempVo.getDbsyTotalPrice().divide(shangYeArea, 2, RoundingMode.HALF_UP);
                        }
                        precipitateSsdb.setSsDingBiaoPriceDjm(tempDbzzTotalPrice.add(tempDbfjTotalPrice).add(tempDbsyTotalPrice).add(tempDbcdzTotalPrice));
                    }
                }
            }
            if (i == 19) {
                if (bdItemVo != null && bdItemVo.getSupplyCompany() == null && bdItemVo.getJieDuan() == 1) {
                    precipitateSsdb.setBasePriceA(bdItemVo.getDbxzzTotalPrice());
                    if (zhuZhaiArea.compareTo(BigDecimal.ZERO) != 0) {
                        precipitateSsdb.setBasePriceAjm(bdItemVo.getDbxzzTotalPrice().divide(zhuZhaiArea, 2, RoundingMode.HALF_UP));
                    }
                }
                if (ssbdItemVo != null && ssbdItemVo.getSupplyCompany() == null && ssbdItemVo.getJieDuan() == 7) {
                    precipitateSsdb.setSsBasePriceC(ssbdItemVo.getDbxzzTotalPrice());
                    if (zhuZhaiArea.compareTo(BigDecimal.ZERO) != 0) {
                        precipitateSsdb.setSsBasePriceCjm(ssbdItemVo.getDbxzzTotalPrice().divide(zhuZhaiArea, 2, RoundingMode.HALF_UP));
                    }
                }
                for (FeXiExtractingVo tempVo : sValue) {
                    if (tempVo.getSupplyCompany() != null && tempVo.getJieDuan() == 6) {
                        precipitateSsdb.setDingBiaoPriceB(tempVo.getDbxzzTotalPrice());
                        if (zhuZhaiArea.compareTo(BigDecimal.ZERO) != 0) {
                            precipitateSsdb.setDingBiaoPriceBjm(tempVo.getDbxzzTotalPrice().divide(zhuZhaiArea, 2, RoundingMode.HALF_UP));
                        }
                    } else if (tempVo.getSupplyCompany() != null && tempVo.getJieDuan() == 8) {
                        precipitateSsdb.setSsDingBiaoPriceD(tempVo.getDbxzzTotalPrice());
                        if (zhuZhaiArea.compareTo(BigDecimal.ZERO) != 0) {
                            precipitateSsdb.setSsDingBiaoPriceDjm(tempVo.getDbxzzTotalPrice().divide(zhuZhaiArea, 2, RoundingMode.HALF_UP));
                        }
                    }
                }
            }
            if (i == 20) {
                if (bdItemVo != null && bdItemVo.getSupplyCompany() == null && bdItemVo.getJieDuan() == 1) {
                    precipitateSsdb.setBasePriceA(bdItemVo.getDbxfjTotalPrice());
                    if (diXiaShiArea.compareTo(BigDecimal.ZERO) != 0) {
                        precipitateSsdb.setBasePriceAjm(bdItemVo.getDbxfjTotalPrice().divide(diXiaShiArea, 2, RoundingMode.HALF_UP));
                    }
                }
                if (ssbdItemVo != null && ssbdItemVo.getSupplyCompany() == null && ssbdItemVo.getJieDuan() == 7) {
                    precipitateSsdb.setSsBasePriceC(ssbdItemVo.getDbxfjTotalPrice());
                    if (diXiaShiArea.compareTo(BigDecimal.ZERO) != 0) {
                        precipitateSsdb.setSsBasePriceCjm(ssbdItemVo.getDbxfjTotalPrice().divide(diXiaShiArea, 2, RoundingMode.HALF_UP));
                    }
                }
                for (FeXiExtractingVo tempVo : sValue) {
                    if (tempVo.getSupplyCompany() != null && tempVo.getJieDuan() == 6) {
                        precipitateSsdb.setDingBiaoPriceB(tempVo.getDbxfjTotalPrice());
                        if (diXiaShiArea.compareTo(BigDecimal.ZERO) != 0) {
                            precipitateSsdb.setDingBiaoPriceBjm(tempVo.getDbxfjTotalPrice().divide(diXiaShiArea, 2, RoundingMode.HALF_UP));
                        }
                    } else if (tempVo.getSupplyCompany() != null && tempVo.getJieDuan() == 8) {
                        precipitateSsdb.setSsDingBiaoPriceD(tempVo.getDbxfjTotalPrice());
                        if (diXiaShiArea.compareTo(BigDecimal.ZERO) != 0) {
                            precipitateSsdb.setSsDingBiaoPriceDjm(tempVo.getDbxfjTotalPrice().divide(diXiaShiArea, 2, RoundingMode.HALF_UP));
                        }
                    }
                }
            }
            if (i == 21) {
                if (bdItemVo != null && bdItemVo.getSupplyCompany() == null && bdItemVo.getJieDuan() == 1) {
                    precipitateSsdb.setBasePriceA(bdItemVo.getDbxsyTotalPrice());
                    if (shangYeArea.compareTo(BigDecimal.ZERO) != 0) {
                        precipitateSsdb.setBasePriceAjm(bdItemVo.getDbxsyTotalPrice().divide(shangYeArea, 2, RoundingMode.HALF_UP));
                    }
                }
                if (ssbdItemVo != null && ssbdItemVo.getSupplyCompany() == null && ssbdItemVo.getJieDuan() == 7) {
                    precipitateSsdb.setSsBasePriceC(ssbdItemVo.getDbxsyTotalPrice());
                    if (shangYeArea.compareTo(BigDecimal.ZERO) != 0) {
                        precipitateSsdb.setSsBasePriceCjm(ssbdItemVo.getDbxsyTotalPrice().divide(shangYeArea, 2, RoundingMode.HALF_UP));
                    }
                }
                for (FeXiExtractingVo tempVo : sValue) {
                    if (tempVo.getSupplyCompany() != null && tempVo.getJieDuan() == 6) {
                        precipitateSsdb.setDingBiaoPriceB(tempVo.getDbxsyTotalPrice());
                        if (shangYeArea.compareTo(BigDecimal.ZERO) != 0) {
                            precipitateSsdb.setDingBiaoPriceBjm(tempVo.getDbxsyTotalPrice().divide(shangYeArea, 2, RoundingMode.HALF_UP));
                        }
                    } else if (tempVo.getSupplyCompany() != null && tempVo.getJieDuan() == 8) {
                        precipitateSsdb.setSsDingBiaoPriceD(tempVo.getDbxsyTotalPrice());
                        if (shangYeArea.compareTo(BigDecimal.ZERO) != 0) {
                            precipitateSsdb.setSsDingBiaoPriceDjm(tempVo.getDbxsyTotalPrice().divide(shangYeArea, 2, RoundingMode.HALF_UP));
                        }
                    }
                }
            }
            if (i == 22) {
                if (bdItemVo != null && bdItemVo.getSupplyCompany() == null && bdItemVo.getJieDuan() == 1) {
                    precipitateSsdb.setBasePriceA(bdItemVo.getDbxcdzTotalPrice());
                    if (diXiaShiArea.compareTo(BigDecimal.ZERO) != 0) {
                        precipitateSsdb.setBasePriceAjm(bdItemVo.getDbxcdzTotalPrice().divide(diXiaShiArea, 2, RoundingMode.HALF_UP));
                    }
                }
                if (ssbdItemVo != null && ssbdItemVo.getSupplyCompany() == null && ssbdItemVo.getJieDuan() == 7) {
                    precipitateSsdb.setSsBasePriceC(ssbdItemVo.getDbxcdzTotalPrice());
                    if (diXiaShiArea.compareTo(BigDecimal.ZERO) != 0) {
                        precipitateSsdb.setSsBasePriceCjm(ssbdItemVo.getDbxcdzTotalPrice().divide(diXiaShiArea, 2, RoundingMode.HALF_UP));
                    }
                }
                for (FeXiExtractingVo tempVo : sValue) {
                    if (tempVo.getSupplyCompany() != null && tempVo.getJieDuan() == 6) {
                        precipitateSsdb.setDingBiaoPriceB(tempVo.getDbxcdzTotalPrice());
                        if (diXiaShiArea.compareTo(BigDecimal.ZERO) != 0) {
                            precipitateSsdb.setDingBiaoPriceBjm(tempVo.getDbxcdzTotalPrice().divide(diXiaShiArea, 2, RoundingMode.HALF_UP));
                        }
                    } else if (tempVo.getSupplyCompany() != null && tempVo.getJieDuan() == 8) {
                        precipitateSsdb.setSsDingBiaoPriceD(tempVo.getDbxcdzTotalPrice());
                        if (diXiaShiArea.compareTo(BigDecimal.ZERO) != 0) {
                            precipitateSsdb.setSsDingBiaoPriceDjm(tempVo.getDbxcdzTotalPrice().divide(diXiaShiArea, 2, RoundingMode.HALF_UP));
                        }
                    }
                }
            }
            if (i == 23) {
                if (bdItemVo != null && bdItemVo.getSupplyCompany() == null && bdItemVo.getJieDuan() == 1) {
                    precipitateSsdb.setBasePriceA(bdItemVo.getDbxTotalPriceCount());
                    BigDecimal tempDbxzzTotalPrice = BigDecimal.ZERO;
                    BigDecimal tempDbxfjTotalPrice = BigDecimal.ZERO;
                    BigDecimal tempDbxsyTotalPrice = BigDecimal.ZERO;
                    BigDecimal tempDbxcdzTotalPrice = BigDecimal.ZERO;
                    if (zhuZhaiArea.compareTo(BigDecimal.ZERO) != 0) {
                        tempDbxzzTotalPrice = bdItemVo.getDbxzzTotalPrice().divide(zhuZhaiArea, 2, RoundingMode.HALF_UP);
                    }
                    if (diXiaShiArea.compareTo(BigDecimal.ZERO) != 0) {
                        tempDbxfjTotalPrice = bdItemVo.getDbxfjTotalPrice().divide(diXiaShiArea, 2, RoundingMode.HALF_UP);
                        tempDbxcdzTotalPrice = bdItemVo.getDbxcdzTotalPrice().divide(diXiaShiArea, 2, RoundingMode.HALF_UP);
                    }
                    if (shangYeArea.compareTo(BigDecimal.ZERO) != 0) {
                        tempDbxsyTotalPrice = bdItemVo.getDbxsyTotalPrice().divide(shangYeArea, 2, RoundingMode.HALF_UP);
                    }
                    precipitateSsdb.setBasePriceAjm(tempDbxzzTotalPrice.add(tempDbxfjTotalPrice).add(tempDbxsyTotalPrice).add(tempDbxcdzTotalPrice));
                }
                if (ssbdItemVo != null && ssbdItemVo.getSupplyCompany() == null && ssbdItemVo.getJieDuan() == 7) {
                    precipitateSsdb.setSsBasePriceC(ssbdItemVo.getDbxTotalPriceCount());
                    BigDecimal tempDbxzzTotalPrice = BigDecimal.ZERO;
                    BigDecimal tempDbxfjTotalPrice = BigDecimal.ZERO;
                    BigDecimal tempDbxsyTotalPrice = BigDecimal.ZERO;
                    BigDecimal tempDbxcdzTotalPrice = BigDecimal.ZERO;
                    if (zhuZhaiArea.compareTo(BigDecimal.ZERO) != 0) {
                        tempDbxzzTotalPrice = ssbdItemVo.getDbxzzTotalPrice().divide(zhuZhaiArea, 2, RoundingMode.HALF_UP);
                    }
                    if (diXiaShiArea.compareTo(BigDecimal.ZERO) != 0) {
                        tempDbxfjTotalPrice = ssbdItemVo.getDbxfjTotalPrice().divide(diXiaShiArea, 2, RoundingMode.HALF_UP);
                        tempDbxcdzTotalPrice = ssbdItemVo.getDbxcdzTotalPrice().divide(diXiaShiArea, 2, RoundingMode.HALF_UP);
                    }
                    if (shangYeArea.compareTo(BigDecimal.ZERO) != 0) {
                        tempDbxsyTotalPrice = ssbdItemVo.getDbxsyTotalPrice().divide(shangYeArea, 2, RoundingMode.HALF_UP);
                    }
                    precipitateSsdb.setSsBasePriceCjm(tempDbxzzTotalPrice.add(tempDbxfjTotalPrice).add(tempDbxsyTotalPrice).add(tempDbxcdzTotalPrice));
                }
                for (FeXiExtractingVo tempVo : sValue) {
                    if (tempVo.getSupplyCompany() != null && tempVo.getJieDuan() == 6) {
                        precipitateSsdb.setDingBiaoPriceB(tempVo.getDbxTotalPriceCount());
                        BigDecimal tempDbxzzTotalPrice = BigDecimal.ZERO;
                        BigDecimal tempDbxfjTotalPrice = BigDecimal.ZERO;
                        BigDecimal tempDbxsyTotalPrice = BigDecimal.ZERO;
                        BigDecimal tempDbxcdzTotalPrice = BigDecimal.ZERO;
                        if (zhuZhaiArea.compareTo(BigDecimal.ZERO) != 0) {
                            tempDbxzzTotalPrice = tempVo.getDbxzzTotalPrice().divide(zhuZhaiArea, 2, RoundingMode.HALF_UP);
                        }
                        if (diXiaShiArea.compareTo(BigDecimal.ZERO) != 0) {
                            tempDbxfjTotalPrice = tempVo.getDbxfjTotalPrice().divide(diXiaShiArea, 2, RoundingMode.HALF_UP);
                            tempDbxcdzTotalPrice = tempVo.getDbxcdzTotalPrice().divide(diXiaShiArea, 2, RoundingMode.HALF_UP);
                        }
                        if (shangYeArea.compareTo(BigDecimal.ZERO) != 0) {
                            tempDbxsyTotalPrice = tempVo.getDbxsyTotalPrice().divide(shangYeArea, 2, RoundingMode.HALF_UP);
                        }
                        precipitateSsdb.setDingBiaoPriceBjm(tempDbxzzTotalPrice.add(tempDbxfjTotalPrice).add(tempDbxsyTotalPrice).add(tempDbxcdzTotalPrice));
                    } else if (tempVo.getSupplyCompany() != null && tempVo.getJieDuan() == 8) {
                        precipitateSsdb.setSsDingBiaoPriceD(tempVo.getDbxTotalPriceCount());
                        BigDecimal tempDbxzzTotalPrice = BigDecimal.ZERO;
                        BigDecimal tempDbxfjTotalPrice = BigDecimal.ZERO;
                        BigDecimal tempDbxsyTotalPrice = BigDecimal.ZERO;
                        BigDecimal tempDbxcdzTotalPrice = BigDecimal.ZERO;
                        if (zhuZhaiArea.compareTo(BigDecimal.ZERO) != 0) {
                            tempDbxzzTotalPrice = tempVo.getDbxzzTotalPrice().divide(zhuZhaiArea, 2, RoundingMode.HALF_UP);
                        }
                        if (diXiaShiArea.compareTo(BigDecimal.ZERO) != 0) {
                            tempDbxfjTotalPrice = tempVo.getDbxfjTotalPrice().divide(diXiaShiArea, 2, RoundingMode.HALF_UP);
                            tempDbxcdzTotalPrice = tempVo.getDbxcdzTotalPrice().divide(diXiaShiArea, 2, RoundingMode.HALF_UP);
                        }
                        if (shangYeArea.compareTo(BigDecimal.ZERO) != 0) {
                            tempDbxsyTotalPrice = tempVo.getDbxsyTotalPrice().divide(shangYeArea, 2, RoundingMode.HALF_UP);
                        }
                        precipitateSsdb.setSsDingBiaoPriceDjm(tempDbxzzTotalPrice.add(tempDbxfjTotalPrice).add(tempDbxsyTotalPrice).add(tempDbxcdzTotalPrice));
                    }
                }
            }
            if (i == 24) {
                if (bdItemVo != null && bdItemVo.getSupplyCompany() == null && bdItemVo.getJieDuan() == 1) {
                    precipitateSsdb.setBasePriceA(bdItemVo.getDydlzzTotalPrice());
                    if (zhuZhaiArea.compareTo(BigDecimal.ZERO) != 0) {
                        precipitateSsdb.setBasePriceAjm(bdItemVo.getDydlzzTotalPrice().divide(zhuZhaiArea, 2, RoundingMode.HALF_UP));
                    }
                }
                if (ssbdItemVo != null && ssbdItemVo.getSupplyCompany() == null && ssbdItemVo.getJieDuan() == 7) {
                    precipitateSsdb.setSsBasePriceC(ssbdItemVo.getDydlzzTotalPrice());
                    if (zhuZhaiArea.compareTo(BigDecimal.ZERO) != 0) {
                        precipitateSsdb.setSsBasePriceCjm(ssbdItemVo.getDydlzzTotalPrice().divide(zhuZhaiArea, 2, RoundingMode.HALF_UP));
                    }
                }
                for (FeXiExtractingVo tempVo : sValue) {
                    if (tempVo.getSupplyCompany() != null && tempVo.getJieDuan() == 6) {
                        precipitateSsdb.setDingBiaoPriceB(tempVo.getDydlzzTotalPrice());
                        if (zhuZhaiArea.compareTo(BigDecimal.ZERO) != 0) {
                            precipitateSsdb.setDingBiaoPriceBjm(tempVo.getDydlzzTotalPrice().divide(zhuZhaiArea, 2, RoundingMode.HALF_UP));
                        }
                    } else if (tempVo.getSupplyCompany() != null && tempVo.getJieDuan() == 8) {
                        precipitateSsdb.setSsDingBiaoPriceD(tempVo.getDydlzzTotalPrice());
                        if (zhuZhaiArea.compareTo(BigDecimal.ZERO) != 0) {
                            precipitateSsdb.setSsDingBiaoPriceDjm(tempVo.getDydlzzTotalPrice().divide(zhuZhaiArea, 2, RoundingMode.HALF_UP));
                        }
                    }
                }
            }
            if (i == 25) {
                if (bdItemVo != null && bdItemVo.getSupplyCompany() == null && bdItemVo.getJieDuan() == 1) {
                    precipitateSsdb.setBasePriceA(bdItemVo.getDydlfjTotalPrice());
                    if (diXiaShiArea.compareTo(BigDecimal.ZERO) != 0) {
                        precipitateSsdb.setBasePriceAjm(bdItemVo.getDydlfjTotalPrice().divide(diXiaShiArea, 2, RoundingMode.HALF_UP));
                    }
                }
                if (ssbdItemVo != null && ssbdItemVo.getSupplyCompany() == null && ssbdItemVo.getJieDuan() == 7) {
                    precipitateSsdb.setSsBasePriceC(ssbdItemVo.getDydlfjTotalPrice());
                    if (diXiaShiArea.compareTo(BigDecimal.ZERO) != 0) {
                        precipitateSsdb.setSsBasePriceCjm(ssbdItemVo.getDydlfjTotalPrice().divide(diXiaShiArea, 2, RoundingMode.HALF_UP));
                    }
                }
                for (FeXiExtractingVo tempVo : sValue) {
                    if (tempVo.getSupplyCompany() != null && tempVo.getJieDuan() == 6) {
                        precipitateSsdb.setDingBiaoPriceB(tempVo.getDydlfjTotalPrice());
                        if (diXiaShiArea.compareTo(BigDecimal.ZERO) != 0) {
                            precipitateSsdb.setDingBiaoPriceBjm(tempVo.getDydlfjTotalPrice().divide(diXiaShiArea, 2, RoundingMode.HALF_UP));
                        }
                    } else if (tempVo.getSupplyCompany() != null && tempVo.getJieDuan() == 8) {
                        precipitateSsdb.setSsDingBiaoPriceD(tempVo.getDydlfjTotalPrice());
                        if (diXiaShiArea.compareTo(BigDecimal.ZERO) != 0) {
                            precipitateSsdb.setSsDingBiaoPriceDjm(tempVo.getDydlfjTotalPrice().divide(diXiaShiArea, 2, RoundingMode.HALF_UP));
                        }
                    }
                }
            }
            if (i == 26) {
                if (bdItemVo != null && bdItemVo.getSupplyCompany() == null && bdItemVo.getJieDuan() == 1) {
                    precipitateSsdb.setBasePriceA(bdItemVo.getDydlsyTotalPrice());
                    if (shangYeArea.compareTo(BigDecimal.ZERO) != 0) {
                        precipitateSsdb.setBasePriceAjm(bdItemVo.getDydlsyTotalPrice().divide(shangYeArea, 2, RoundingMode.HALF_UP));
                    }
                }
                if (ssbdItemVo != null && ssbdItemVo.getSupplyCompany() == null && ssbdItemVo.getJieDuan() == 7) {
                    precipitateSsdb.setSsBasePriceC(ssbdItemVo.getDydlsyTotalPrice());
                    if (shangYeArea.compareTo(BigDecimal.ZERO) != 0) {
                        precipitateSsdb.setSsBasePriceCjm(ssbdItemVo.getDydlsyTotalPrice().divide(shangYeArea, 2, RoundingMode.HALF_UP));
                    }
                }
                for (FeXiExtractingVo tempVo : sValue) {
                    if (tempVo.getSupplyCompany() != null && tempVo.getJieDuan() == 6) {
                        precipitateSsdb.setDingBiaoPriceB(tempVo.getDydlsyTotalPrice());
                        if (shangYeArea.compareTo(BigDecimal.ZERO) != 0) {
                            precipitateSsdb.setDingBiaoPriceBjm(tempVo.getDydlsyTotalPrice().divide(shangYeArea, 2, RoundingMode.HALF_UP));
                        }
                    } else if (tempVo.getSupplyCompany() != null && tempVo.getJieDuan() == 8) {
                        precipitateSsdb.setSsDingBiaoPriceD(tempVo.getDydlsyTotalPrice());
                        if (shangYeArea.compareTo(BigDecimal.ZERO) != 0) {
                            precipitateSsdb.setSsDingBiaoPriceDjm(tempVo.getDydlsyTotalPrice().divide(shangYeArea, 2, RoundingMode.HALF_UP));
                        }
                    }
                }
            }
            if (i == 27) {
                if (bdItemVo != null && bdItemVo.getSupplyCompany() == null && bdItemVo.getJieDuan() == 1) {
                    precipitateSsdb.setBasePriceA(bdItemVo.getDydlcdzTotalPrice());
                    if (diXiaShiArea.compareTo(BigDecimal.ZERO) != 0) {
                        precipitateSsdb.setBasePriceAjm(bdItemVo.getDydlcdzTotalPrice().divide(diXiaShiArea, 2, RoundingMode.HALF_UP));
                    }
                }
                if (ssbdItemVo != null && ssbdItemVo.getSupplyCompany() == null && ssbdItemVo.getJieDuan() == 7) {
                    precipitateSsdb.setSsBasePriceC(ssbdItemVo.getDydlcdzTotalPrice());
                    if (diXiaShiArea.compareTo(BigDecimal.ZERO) != 0) {
                        precipitateSsdb.setSsBasePriceCjm(ssbdItemVo.getDydlcdzTotalPrice().divide(diXiaShiArea, 2, RoundingMode.HALF_UP));
                    }
                }
                for (FeXiExtractingVo tempVo : sValue) {
                    if (tempVo.getSupplyCompany() != null && tempVo.getJieDuan() == 6) {
                        precipitateSsdb.setDingBiaoPriceB(tempVo.getDydlcdzTotalPrice());
                        if (diXiaShiArea.compareTo(BigDecimal.ZERO) != 0) {
                            precipitateSsdb.setDingBiaoPriceBjm(tempVo.getDydlcdzTotalPrice().divide(diXiaShiArea, 2, RoundingMode.HALF_UP));
                        }
                    } else if (tempVo.getSupplyCompany() != null && tempVo.getJieDuan() == 8) {
                        precipitateSsdb.setSsDingBiaoPriceD(tempVo.getDydlcdzTotalPrice());
                        if (diXiaShiArea.compareTo(BigDecimal.ZERO) != 0) {
                            precipitateSsdb.setSsDingBiaoPriceDjm(tempVo.getDydlcdzTotalPrice().divide(diXiaShiArea, 2, RoundingMode.HALF_UP));
                        }
                    }
                }
            }
            if (i == 28) {
                if (bdItemVo != null && bdItemVo.getSupplyCompany() == null && bdItemVo.getJieDuan() == 1) {
                    precipitateSsdb.setBasePriceA(bdItemVo.getDydlTotalPriceCount());
                    BigDecimal tempDydlzzTotalPrice = BigDecimal.ZERO;
                    BigDecimal tempDydlfjTotalPrice = BigDecimal.ZERO;
                    BigDecimal tempDydlsyTotalPrice = BigDecimal.ZERO;
                    BigDecimal tempDydlcdzTotalPrice = BigDecimal.ZERO;
                    if (zhuZhaiArea.compareTo(BigDecimal.ZERO) != 0) {
                        tempDydlzzTotalPrice = bdItemVo.getDydlzzTotalPrice().divide(zhuZhaiArea, 2, RoundingMode.HALF_UP);
                    }
                    if (diXiaShiArea.compareTo(BigDecimal.ZERO) != 0) {
                        tempDydlfjTotalPrice = bdItemVo.getDydlfjTotalPrice().divide(diXiaShiArea, 2, RoundingMode.HALF_UP);
                        tempDydlcdzTotalPrice = bdItemVo.getDydlcdzTotalPrice().divide(diXiaShiArea, 2, RoundingMode.HALF_UP);
                    }
                    if (shangYeArea.compareTo(BigDecimal.ZERO) != 0) {
                        tempDydlsyTotalPrice = bdItemVo.getDydlsyTotalPrice().divide(shangYeArea, 2, RoundingMode.HALF_UP);
                    }
                    precipitateSsdb.setBasePriceAjm(tempDydlzzTotalPrice.add(tempDydlfjTotalPrice).add(tempDydlsyTotalPrice).add(tempDydlcdzTotalPrice));
                }
                if (ssbdItemVo != null && ssbdItemVo.getSupplyCompany() == null && ssbdItemVo.getJieDuan() == 7) {
                    precipitateSsdb.setSsBasePriceC(ssbdItemVo.getDydlTotalPriceCount());
                    BigDecimal tempDydlzzTotalPrice = BigDecimal.ZERO;
                    BigDecimal tempDydlfjTotalPrice = BigDecimal.ZERO;
                    BigDecimal tempDydlsyTotalPrice = BigDecimal.ZERO;
                    BigDecimal tempDydlcdzTotalPrice = BigDecimal.ZERO;
                    if (zhuZhaiArea.compareTo(BigDecimal.ZERO) != 0) {
                        tempDydlzzTotalPrice = ssbdItemVo.getDydlzzTotalPrice().divide(zhuZhaiArea, 2, RoundingMode.HALF_UP);
                    }
                    if (diXiaShiArea.compareTo(BigDecimal.ZERO) != 0) {
                        tempDydlfjTotalPrice = ssbdItemVo.getDydlfjTotalPrice().divide(diXiaShiArea, 2, RoundingMode.HALF_UP);
                        tempDydlcdzTotalPrice = ssbdItemVo.getDydlcdzTotalPrice().divide(diXiaShiArea, 2, RoundingMode.HALF_UP);
                    }
                    if (shangYeArea.compareTo(BigDecimal.ZERO) != 0) {
                        tempDydlsyTotalPrice = ssbdItemVo.getDydlsyTotalPrice().divide(shangYeArea, 2, RoundingMode.HALF_UP);
                    }
                    precipitateSsdb.setSsBasePriceCjm(tempDydlzzTotalPrice.add(tempDydlfjTotalPrice).add(tempDydlsyTotalPrice).add(tempDydlcdzTotalPrice));
                }
                for (FeXiExtractingVo tempVo : sValue) {
                    if (tempVo.getSupplyCompany() != null && tempVo.getJieDuan() == 6) {
                        precipitateSsdb.setDingBiaoPriceB(tempVo.getDydlTotalPriceCount());
                        BigDecimal tempDydlzzTotalPrice = BigDecimal.ZERO;
                        BigDecimal tempDydlfjTotalPrice = BigDecimal.ZERO;
                        BigDecimal tempDydlsyTotalPrice = BigDecimal.ZERO;
                        BigDecimal tempDydlcdzTotalPrice = BigDecimal.ZERO;
                        if (zhuZhaiArea.compareTo(BigDecimal.ZERO) != 0) {
                            tempDydlzzTotalPrice = tempVo.getDydlzzTotalPrice().divide(zhuZhaiArea, 2, RoundingMode.HALF_UP);
                        }
                        if (diXiaShiArea.compareTo(BigDecimal.ZERO) != 0) {
                            tempDydlfjTotalPrice = tempVo.getDydlfjTotalPrice().divide(diXiaShiArea, 2, RoundingMode.HALF_UP);
                            tempDydlcdzTotalPrice = tempVo.getDydlcdzTotalPrice().divide(diXiaShiArea, 2, RoundingMode.HALF_UP);
                        }
                        if (shangYeArea.compareTo(BigDecimal.ZERO) != 0) {
                            tempDydlsyTotalPrice = tempVo.getDydlsyTotalPrice().divide(shangYeArea, 2, RoundingMode.HALF_UP);
                        }
                        precipitateSsdb.setDingBiaoPriceBjm(tempDydlzzTotalPrice.add(tempDydlfjTotalPrice).add(tempDydlsyTotalPrice).add(tempDydlcdzTotalPrice));
                    } else if (tempVo.getSupplyCompany() != null && tempVo.getJieDuan() == 8) {
                        precipitateSsdb.setSsDingBiaoPriceD(tempVo.getDydlTotalPriceCount());
                        BigDecimal tempDydlzzTotalPrice = BigDecimal.ZERO;
                        BigDecimal tempDydlfjTotalPrice = BigDecimal.ZERO;
                        BigDecimal tempDydlsyTotalPrice = BigDecimal.ZERO;
                        BigDecimal tempDydlcdzTotalPrice = BigDecimal.ZERO;
                        if (zhuZhaiArea.compareTo(BigDecimal.ZERO) != 0) {
                            tempDydlzzTotalPrice = tempVo.getDydlzzTotalPrice().divide(zhuZhaiArea, 2, RoundingMode.HALF_UP);
                        }
                        if (diXiaShiArea.compareTo(BigDecimal.ZERO) != 0) {
                            tempDydlfjTotalPrice = tempVo.getDydlfjTotalPrice().divide(diXiaShiArea, 2, RoundingMode.HALF_UP);
                            tempDydlcdzTotalPrice = tempVo.getDydlcdzTotalPrice().divide(diXiaShiArea, 2, RoundingMode.HALF_UP);
                        }
                        if (shangYeArea.compareTo(BigDecimal.ZERO) != 0) {
                            tempDydlsyTotalPrice = tempVo.getDydlsyTotalPrice().divide(shangYeArea, 2, RoundingMode.HALF_UP);
                        }
                        precipitateSsdb.setSsDingBiaoPriceDjm(tempDydlzzTotalPrice.add(tempDydlfjTotalPrice).add(tempDydlsyTotalPrice).add(tempDydlcdzTotalPrice));
                    }
                }
            }
            if (i == 29) {
                if (bdItemVo != null && bdItemVo.getSupplyCompany() == null && bdItemVo.getJieDuan() == 1) {
                    precipitateSsdb.setBasePriceA(bdItemVo.getMxcTotalPrice());
                    if (zongArea.compareTo(BigDecimal.ZERO) != 0) {
                        precipitateSsdb.setBasePriceAjm(bdItemVo.getMxcTotalPrice().divide(zongArea, 2, RoundingMode.HALF_UP));
                    }
                }
                if (ssbdItemVo != null && ssbdItemVo.getSupplyCompany() == null && ssbdItemVo.getJieDuan() == 7) {
                    precipitateSsdb.setSsBasePriceC(ssbdItemVo.getMxcTotalPrice());
                    if (zongArea.compareTo(BigDecimal.ZERO) != 0) {
                        precipitateSsdb.setSsBasePriceCjm(ssbdItemVo.getMxcTotalPrice().divide(zongArea, 2, RoundingMode.HALF_UP));
                    }
                }
                for (FeXiExtractingVo tempVo : sValue) {
                    if (tempVo.getSupplyCompany() != null && tempVo.getJieDuan() == 6) {
                        precipitateSsdb.setDingBiaoPriceB(tempVo.getMxcTotalPrice());
                        if (zongArea.compareTo(BigDecimal.ZERO) != 0) {
                            precipitateSsdb.setDingBiaoPriceBjm(tempVo.getMxcTotalPrice().divide(zongArea, 2, RoundingMode.HALF_UP));
                        }
                    } else if (tempVo.getSupplyCompany() != null && tempVo.getJieDuan() == 8) {
                        precipitateSsdb.setSsDingBiaoPriceD(tempVo.getMxcTotalPrice());
                        if (zongArea.compareTo(BigDecimal.ZERO) != 0) {
                            precipitateSsdb.setSsDingBiaoPriceDjm(tempVo.getMxcTotalPrice().divide(zongArea, 2, RoundingMode.HALF_UP));
                        }
                    }
                }
            }
            if (i == 30) {
                if (bdItemVo != null && bdItemVo.getSupplyCompany() == null && bdItemVo.getJieDuan() == 1) {
                    precipitateSsdb.setBasePriceA(bdItemVo.getGydlTotalPrice());
                    if (zongArea.compareTo(BigDecimal.ZERO) != 0) {
                        precipitateSsdb.setBasePriceAjm(bdItemVo.getGydlTotalPrice().divide(zongArea, 2, RoundingMode.HALF_UP));
                    }
                }
                if (ssbdItemVo != null && ssbdItemVo.getSupplyCompany() == null && ssbdItemVo.getJieDuan() == 7) {
                    precipitateSsdb.setSsBasePriceC(ssbdItemVo.getGydlTotalPrice());
                    if (zongArea.compareTo(BigDecimal.ZERO) != 0) {
                        precipitateSsdb.setSsBasePriceCjm(ssbdItemVo.getGydlTotalPrice().divide(zongArea, 2, RoundingMode.HALF_UP));
                    }
                }
                for (FeXiExtractingVo tempVo : sValue) {
                    if (tempVo.getSupplyCompany() != null && tempVo.getJieDuan() == 6) {
                        precipitateSsdb.setDingBiaoPriceB(tempVo.getGydlTotalPrice());
                        if (zongArea.compareTo(BigDecimal.ZERO) != 0) {
                            precipitateSsdb.setDingBiaoPriceBjm(tempVo.getGydlTotalPrice().divide(zongArea, 2, RoundingMode.HALF_UP));
                        }
                    } else if (tempVo.getSupplyCompany() != null && tempVo.getJieDuan() == 8) {
                        precipitateSsdb.setSsDingBiaoPriceD(tempVo.getGydlTotalPrice());
                        if (zongArea.compareTo(BigDecimal.ZERO) != 0) {
                            precipitateSsdb.setSsDingBiaoPriceDjm(tempVo.getGydlTotalPrice().divide(zongArea, 2, RoundingMode.HALF_UP));
                        }
                    }
                }
            }
            if (i == 31) {
                if (bdItemVo != null && bdItemVo.getSupplyCompany() == null && bdItemVo.getJieDuan() == 1) {
                    precipitateSsdb.setBasePriceA(bdItemVo.getPdxTotalPrice());
                    if (zongArea.compareTo(BigDecimal.ZERO) != 0) {
                        precipitateSsdb.setBasePriceAjm(bdItemVo.getPdxTotalPrice().divide(zongArea, 2, RoundingMode.HALF_UP));
                    }
                }
                if (ssbdItemVo != null && ssbdItemVo.getSupplyCompany() == null && ssbdItemVo.getJieDuan() == 7) {
                    precipitateSsdb.setSsBasePriceC(ssbdItemVo.getPdxTotalPrice());
                    if (zongArea.compareTo(BigDecimal.ZERO) != 0) {
                        precipitateSsdb.setSsBasePriceCjm(ssbdItemVo.getPdxTotalPrice().divide(zongArea, 2, RoundingMode.HALF_UP));
                    }
                }
                for (FeXiExtractingVo tempVo : sValue) {
                    if (tempVo.getSupplyCompany() != null && tempVo.getJieDuan() == 6) {
                        precipitateSsdb.setDingBiaoPriceB(tempVo.getPdxTotalPrice());
                        if (zongArea.compareTo(BigDecimal.ZERO) != 0) {
                            precipitateSsdb.setDingBiaoPriceBjm(tempVo.getPdxTotalPrice().divide(zongArea, 2, RoundingMode.HALF_UP));
                        }
                    } else if (tempVo.getSupplyCompany() != null && tempVo.getJieDuan() == 8) {
                        precipitateSsdb.setSsDingBiaoPriceD(tempVo.getPdxTotalPrice());
                        if (zongArea.compareTo(BigDecimal.ZERO) != 0) {
                            precipitateSsdb.setSsDingBiaoPriceDjm(tempVo.getPdxTotalPrice().divide(zongArea, 2, RoundingMode.HALF_UP));
                        }
                    }
                }
            }
            if (i == 32) {
                if (bdItemVo != null && bdItemVo.getSupplyCompany() == null && bdItemVo.getJieDuan() == 1) {
                    precipitateSsdb.setBasePriceA(bdItemVo.getTsTotalPrice());
                    if (zongArea.compareTo(BigDecimal.ZERO) != 0) {
                        precipitateSsdb.setBasePriceAjm(bdItemVo.getTsTotalPrice().divide(zongArea, 2, RoundingMode.HALF_UP));
                    }
                }
                if (ssbdItemVo != null && ssbdItemVo.getSupplyCompany() == null && ssbdItemVo.getJieDuan() == 7) {
                    precipitateSsdb.setSsBasePriceC(bdItemVo.getTsTotalPrice());
                    if (zongArea.compareTo(BigDecimal.ZERO) != 0) {
                        precipitateSsdb.setSsBasePriceCjm(bdItemVo.getTsTotalPrice().divide(zongArea, 2, RoundingMode.HALF_UP));
                    }
                }
                for (FeXiExtractingVo tempVo : sValue) {
                    if (tempVo.getSupplyCompany() != null && tempVo.getJieDuan() == 6) {
                        precipitateSsdb.setDingBiaoPriceB(tempVo.getTsTotalPrice());
                        if (zongArea.compareTo(BigDecimal.ZERO) != 0) {
                            precipitateSsdb.setDingBiaoPriceBjm(tempVo.getTsTotalPrice().divide(zongArea, 2, RoundingMode.HALF_UP));
                        }
                    } else if (tempVo.getSupplyCompany() != null && tempVo.getJieDuan() == 8) {
                        precipitateSsdb.setSsDingBiaoPriceD(tempVo.getTsTotalPrice());
                        if (zongArea.compareTo(BigDecimal.ZERO) != 0) {
                            precipitateSsdb.setSsDingBiaoPriceDjm(tempVo.getTsTotalPrice().divide(zongArea, 2, RoundingMode.HALF_UP));
                        }
                    }
                }
            }
            if (i == 33) {
                if (bdItemVo != null && bdItemVo.getSupplyCompany() == null && bdItemVo.getJieDuan() == 1) {
                    precipitateSsdb.setBasePriceA(bdItemVo.getSxfTotalPrice());
                    if (zongArea.compareTo(BigDecimal.ZERO) != 0) {
                        precipitateSsdb.setBasePriceAjm(bdItemVo.getSxfTotalPrice().divide(zongArea, 2, RoundingMode.HALF_UP));
                    }
                }
                if (ssbdItemVo != null && ssbdItemVo.getSupplyCompany() == null && ssbdItemVo.getJieDuan() == 7) {
                    precipitateSsdb.setSsBasePriceC(ssbdItemVo.getSxfTotalPrice());
                    if (zongArea.compareTo(BigDecimal.ZERO) != 0) {
                        precipitateSsdb.setSsBasePriceCjm(ssbdItemVo.getSxfTotalPrice().divide(zongArea, 2, RoundingMode.HALF_UP));
                    }
                }
                for (FeXiExtractingVo tempVo : sValue) {
                    if (tempVo.getSupplyCompany() != null && tempVo.getJieDuan() == 6) {
                        precipitateSsdb.setDingBiaoPriceB(tempVo.getSxfTotalPrice());
                        if (zongArea.compareTo(BigDecimal.ZERO) != 0) {
                            precipitateSsdb.setDingBiaoPriceBjm(tempVo.getSxfTotalPrice().divide(zongArea, 2, RoundingMode.HALF_UP));
                        }
                    } else if (tempVo.getSupplyCompany() != null && tempVo.getJieDuan() == 8) {
                        precipitateSsdb.setSsDingBiaoPriceD(tempVo.getSxfTotalPrice());
                        if (zongArea.compareTo(BigDecimal.ZERO) != 0) {
                            precipitateSsdb.setSsDingBiaoPriceDjm(tempVo.getSxfTotalPrice().divide(zongArea, 2, RoundingMode.HALF_UP));
                        }
                    }
                }
            }
            if (i == 34) {
                if (bdItemVo != null && bdItemVo.getSupplyCompany() == null && bdItemVo.getJieDuan() == 1) {
                    precipitateSsdb.setBasePriceA(bdItemVo.getQtTotalPrice());
                    if (zongArea.compareTo(BigDecimal.ZERO) != 0) {
                        precipitateSsdb.setBasePriceAjm(bdItemVo.getQtTotalPrice().divide(zongArea, 2, RoundingMode.HALF_UP));
                    }
                }
                if (ssbdItemVo != null && ssbdItemVo.getSupplyCompany() == null && ssbdItemVo.getJieDuan() == 7) {
                    precipitateSsdb.setSsBasePriceC(ssbdItemVo.getQtTotalPrice());
                    if (zongArea.compareTo(BigDecimal.ZERO) != 0) {
                        precipitateSsdb.setSsBasePriceCjm(ssbdItemVo.getQtTotalPrice().divide(zongArea, 2, RoundingMode.HALF_UP));
                    }
                }
                for (FeXiExtractingVo tempVo : sValue) {
                    if (tempVo.getSupplyCompany() != null && tempVo.getJieDuan() == 6) {
                        precipitateSsdb.setDingBiaoPriceB(tempVo.getQtTotalPrice());
                        if (zongArea.compareTo(BigDecimal.ZERO) != 0) {
                            precipitateSsdb.setDingBiaoPriceBjm(tempVo.getQtTotalPrice().divide(zongArea, 2, RoundingMode.HALF_UP));
                        }
                    } else if (tempVo.getSupplyCompany() != null && tempVo.getJieDuan() == 8) {
                        precipitateSsdb.setSsDingBiaoPriceD(tempVo.getQtTotalPrice());
                        if (zongArea.compareTo(BigDecimal.ZERO) != 0) {
                            precipitateSsdb.setSsDingBiaoPriceDjm(tempVo.getQtTotalPrice().divide(zongArea, 2, RoundingMode.HALF_UP));
                        }
                    }
                }
            }
            precipitateSsdbList.add(precipitateSsdb);
        }
        return precipitateSsdbList;
    }


    /**
     * 查询并计算 定标、实施定标 时评标公司及清单沉淀数据
     *
     * @param project
     */
    public List<FeXiExtractingVo> getDbSupplyData(Project project) {
        List<FeXiExtractingVo> voList = new ArrayList<>();

        HashMap hashMap = new HashMap();
        hashMap.put("project.id", project.getId());
        hashMap.put("flag", 1);
        hashMap.put("bidStatus", 1);
        hashMap.put("innerOuterType", 1);
        List<BiddingCompany> innerCompanyList = biddingCompanyService.queryToList(hashMap, null);
        //查询并计算处理内线标底数据
        List<InnerBidBaseTabulation> innerDbBidBaseTabulationList = innerBidBaseTabulationService.getRepository().findByFlagAndProjectIdAndBidType(1, project.getId(), 1);
        FeXiExtractingVo dbVo = handleFenXi(null, innerDbBidBaseTabulationList);
        //内线合同总单方
        dbVo.setInnerZdf(dbVo.getGygTotalPrice().add(dbVo.getDygTotalPriceCount()).add(dbVo.getByqTotalPriceCount()).add(dbVo.getDbTotalPriceCount())
                .add(dbVo.getDbxTotalPriceCount()).add(dbVo.getDydlTotalPriceCount()).add(dbVo.getMxcTotalPrice()).add(dbVo.getGydlTotalPrice())
                .add(dbVo.getPdxTotalPrice()).add(dbVo.getTsTotalPrice()).add(dbVo.getSxfTotalPrice()).add(dbVo.getQtTotalPrice()));
        dbVo.setProject(project);
        dbVo.setJieDuan(1);
        List<InnerBidBaseTabulation> innerSsdbBidBaseTabulationList = innerBidBaseTabulationService.getRepository().findByFlagAndProjectIdAndBidType(1, project.getId(), 2);
        FeXiExtractingVo ssdbVo = handleFenXi(null, innerSsdbBidBaseTabulationList);
        //内线合同总单方
        ssdbVo.setInnerZdf(ssdbVo.getGygTotalPrice().add(ssdbVo.getDygTotalPriceCount()).add(ssdbVo.getByqTotalPriceCount()).add(ssdbVo.getDbTotalPriceCount())
                .add(ssdbVo.getDbxTotalPriceCount()).add(ssdbVo.getDydlTotalPriceCount()).add(ssdbVo.getMxcTotalPrice()).add(ssdbVo.getGydlTotalPrice())
                .add(ssdbVo.getPdxTotalPrice()).add(ssdbVo.getTsTotalPrice()).add(ssdbVo.getSxfTotalPrice()).add(ssdbVo.getQtTotalPrice()));
        ssdbVo.setProject(project);
        ssdbVo.setJieDuan(7);
        voList.add(dbVo);
        voList.add(ssdbVo);
        for (BiddingCompany company : innerCompanyList) {
            List<InnerTabulation> innerDbTabulationList = innerTabulationService.getRepository().findByFlagAndBiddingCompanyIdAndJieDuan(1, company.getId(), 6);
            List<InnerTabulation> innerSsdbTabulationList = innerTabulationService.getRepository().findByFlagAndBiddingCompanyIdAndJieDuan(1, company.getId(), 8);
            if (innerDbTabulationList.size() > 0) {
                hashMap.put("innerOuterType", 2);
                hashMap.put("supplyCompany.id", company.getSupplyCompany().getId());
                List<BiddingCompany> outerCompanyList = biddingCompanyService.queryToList(hashMap, null);
                //理论上outerCompanyList没有或只有一个数据
                BigDecimal outerZdf = BigDecimal.ZERO;
                if (outerCompanyList.size() == 1) {
                    List<OuterTabulation> outerDbTabulationList = outerTabulationService.getRepository().findByFlagAndBiddingCompanyIdAndJieDuan(1, outerCompanyList.get(0).getId(), 6);
                    if (outerDbTabulationList.size() > 0) {
                        //拿到外线统计数据所需值
                        for (OuterTabulation ou : outerDbTabulationList) {
                            if (ou.getTotalPriceOriginal() != null) {
                                outerZdf = outerZdf.add(ou.getTotalPriceOriginal());
                            }
                        }
                    }
                }
                FeXiExtractingVo dbCompanyVo = handleFenXi(innerDbTabulationList, null);
                //内线合同总单方
                dbCompanyVo.setInnerZdf(dbCompanyVo.getGygTotalPrice().add(dbCompanyVo.getDygTotalPriceCount()).add(dbCompanyVo.getByqTotalPriceCount()).add(dbCompanyVo.getDbTotalPriceCount())
                        .add(dbCompanyVo.getDbxTotalPriceCount()).add(dbCompanyVo.getDydlTotalPriceCount()).add(dbCompanyVo.getMxcTotalPrice()).add(dbCompanyVo.getGydlTotalPrice())
                        .add(dbCompanyVo.getPdxTotalPrice()).add(dbCompanyVo.getTsTotalPrice()).add(dbCompanyVo.getSxfTotalPrice()).add(dbCompanyVo.getQtTotalPrice()));
                dbCompanyVo.setProject(project);
                dbCompanyVo.setSupplyCompany(company.getSupplyCompany());
                dbCompanyVo.setOuterZdf(outerZdf);
                dbCompanyVo.setJieDuan(6);
                voList.add(dbCompanyVo);
            }

            if (innerSsdbTabulationList.size() > 0) {
                hashMap.put("innerOuterType", 2);
                hashMap.put("supplyCompany.id", company.getSupplyCompany().getId());
                List<BiddingCompany> outerCompanyList = biddingCompanyService.queryToList(hashMap, null);
                //理论上outerCompanyList没有或只有一个数据
                BigDecimal outerZdf = BigDecimal.ZERO;
                if (outerCompanyList.size() == 1) {
                    List<OuterTabulation> outerSsdbTabulationList = outerTabulationService.getRepository().findByFlagAndBiddingCompanyIdAndJieDuan(1, outerCompanyList.get(0).getId(), 8);
                    if (outerSsdbTabulationList.size() > 0) {
                        //拿到外线统计数据所需值
                        for (OuterTabulation ou : outerSsdbTabulationList) {
                            if (ou.getTotalPriceOriginal() != null) {
                                outerZdf = outerZdf.add(ou.getTotalPriceOriginal());
                            }
                        }
                    }
                }
                FeXiExtractingVo ssdbCompanyVo = handleFenXi(innerSsdbTabulationList, null);
                //内线合同总单方
                ssdbCompanyVo.setInnerZdf(ssdbCompanyVo.getGygTotalPrice().add(ssdbCompanyVo.getDygTotalPriceCount()).add(ssdbCompanyVo.getByqTotalPriceCount()).add(ssdbCompanyVo.getDbTotalPriceCount())
                        .add(ssdbCompanyVo.getDbxTotalPriceCount()).add(ssdbCompanyVo.getDydlTotalPriceCount()).add(ssdbCompanyVo.getMxcTotalPrice()).add(ssdbCompanyVo.getGydlTotalPrice())
                        .add(ssdbCompanyVo.getPdxTotalPrice()).add(ssdbCompanyVo.getTsTotalPrice()).add(ssdbCompanyVo.getSxfTotalPrice()).add(ssdbCompanyVo.getQtTotalPrice()));
                ssdbCompanyVo.setProject(project);
                ssdbCompanyVo.setSupplyCompany(company.getSupplyCompany());
                ssdbCompanyVo.setOuterZdf(outerZdf);
                ssdbCompanyVo.setJieDuan(8);
                voList.add(ssdbCompanyVo);
            }
        }
        return voList;

    }

    /**
     * 数据沉淀-计算相应分类合价
     *
     * @param innerTabulationList
     * @param innerBidBaseTabulationList
     * @return
     */
    public FeXiExtractingVo handleFenXi(List<InnerTabulation> innerTabulationList, List<InnerBidBaseTabulation> innerBidBaseTabulationList) {
        //预留计算值
        FeXiExtractingVo vo = new FeXiExtractingVo();
        BigDecimal gygTotalPrice = BigDecimal.ZERO;
        BigDecimal dygzzTotalPrice = BigDecimal.ZERO;
        BigDecimal dygfjTotalPrice = BigDecimal.ZERO;
        BigDecimal dygsyTotalPrice = BigDecimal.ZERO;
        BigDecimal dygcdzTotalPrice = BigDecimal.ZERO;

        BigDecimal byqzzTotalPrice = BigDecimal.ZERO;
        BigDecimal byqfjTotalPrice = BigDecimal.ZERO;
        BigDecimal byqsyTotalPrice = BigDecimal.ZERO;
        BigDecimal byqcdzTotalPrice = BigDecimal.ZERO;

//        BigDecimal hbzzTotalPrice = BigDecimal.ZERO;
//        BigDecimal hbfjTotalPrice = BigDecimal.ZERO;
//        BigDecimal hbsyTotalPrice = BigDecimal.ZERO;
//        BigDecimal hbcdzTotalPrice = BigDecimal.ZERO;

        BigDecimal dbzzTotalPrice = BigDecimal.ZERO;
        BigDecimal dbfjTotalPrice = BigDecimal.ZERO;
        BigDecimal dbsyTotalPrice = BigDecimal.ZERO;
        BigDecimal dbcdzTotalPrice = BigDecimal.ZERO;

        BigDecimal dbxzzTotalPrice = BigDecimal.ZERO;
        BigDecimal dbxfjTotalPrice = BigDecimal.ZERO;
        BigDecimal dbxsyTotalPrice = BigDecimal.ZERO;
        BigDecimal dbxcdzTotalPrice = BigDecimal.ZERO;

        BigDecimal dydlzzTotalPrice = BigDecimal.ZERO;
        BigDecimal dydlfjTotalPrice = BigDecimal.ZERO;
        BigDecimal dydlsyTotalPrice = BigDecimal.ZERO;
        BigDecimal dydlcdzTotalPrice = BigDecimal.ZERO;

        BigDecimal mxcTotalPrice = BigDecimal.ZERO;
        BigDecimal gydlTotalPrice = BigDecimal.ZERO;
        BigDecimal pdxTotalPrice = BigDecimal.ZERO;
        BigDecimal tsTotalPrice = BigDecimal.ZERO;
        BigDecimal sxfTotalPrice = BigDecimal.ZERO;
        BigDecimal qtTotalPrice = BigDecimal.ZERO;
        if (innerTabulationList != null) {
            //计算处理供应商内线数据
            for (InnerTabulation innerTabulation : innerTabulationList) {
                BigDecimal zhuZhaiBigDecimal = innerTabulation.getZhuZhai() != null ? BigDecimal.valueOf(innerTabulation.getZhuZhai()) : BigDecimal.ZERO;
                BigDecimal feiJuBigDecimal = innerTabulation.getFeiJu() != null ? BigDecimal.valueOf(innerTabulation.getFeiJu()) : BigDecimal.ZERO;
                BigDecimal shangYeBigDecimal = innerTabulation.getShangYe() != null ? BigDecimal.valueOf(innerTabulation.getShangYe()) : BigDecimal.ZERO;
                BigDecimal chongDianZhuangBigDecimal = innerTabulation.getChongDianZhuang() != null ? BigDecimal.valueOf(innerTabulation.getChongDianZhuang()) : BigDecimal.ZERO;
                if ("变压器".equals(innerTabulation.getFenXiFenLei())) {
                    byqzzTotalPrice = byqzzTotalPrice.add(innerTabulation.getComprehensivePriceOriginal().multiply(zhuZhaiBigDecimal));
                    byqfjTotalPrice = byqfjTotalPrice.add(innerTabulation.getComprehensivePriceOriginal().multiply(feiJuBigDecimal));
                    byqsyTotalPrice = byqsyTotalPrice.add(innerTabulation.getComprehensivePriceOriginal().multiply(shangYeBigDecimal));
                    byqcdzTotalPrice = byqcdzTotalPrice.add(innerTabulation.getComprehensivePriceOriginal().multiply(chongDianZhuangBigDecimal));
                }
                if ("低压柜".equals(innerTabulation.getFenXiFenLei())) {
                    dygzzTotalPrice = dygzzTotalPrice.add(innerTabulation.getComprehensivePriceOriginal().multiply(zhuZhaiBigDecimal));
                    dygfjTotalPrice = dygfjTotalPrice.add(innerTabulation.getComprehensivePriceOriginal().multiply(feiJuBigDecimal));
                    dygsyTotalPrice = dygsyTotalPrice.add(innerTabulation.getComprehensivePriceOriginal().multiply(shangYeBigDecimal));
                    dygcdzTotalPrice = dygcdzTotalPrice.add(innerTabulation.getComprehensivePriceOriginal().multiply(chongDianZhuangBigDecimal));
                }
                if ("调试".equals(innerTabulation.getFenXiFenLei())) {
                    tsTotalPrice = tsTotalPrice.add(innerTabulation.getTotalPriceOriginal());
                }
                if ("高压电缆".equals(innerTabulation.getFenXiFenLei())) {
                    gydlTotalPrice = gydlTotalPrice.add(innerTabulation.getTotalPriceOriginal());
                }
                if ("高压柜".equals(innerTabulation.getFenXiFenLei())) {
                    gygTotalPrice = gygTotalPrice.add(innerTabulation.getTotalPriceOriginal());
                }
//                //分析分类的 电表、电表箱合并为户表
//                if ("电表".equals(innerTabulation.getFenXiFenLei()) || "电表箱".equals(innerTabulation.getFenXiFenLei())) {
//                    hbzzTotalPrice = hbzzTotalPrice.add(innerTabulation.getComprehensivePriceOriginal().multiply(zhuZhaiBigDecimal));
//                    hbfjTotalPrice = hbfjTotalPrice.add(innerTabulation.getComprehensivePriceOriginal().multiply(feiJuBigDecimal));
//                    hbsyTotalPrice = hbsyTotalPrice.add(innerTabulation.getComprehensivePriceOriginal().multiply(shangYeBigDecimal));
//                    hbcdzTotalPrice = hbcdzTotalPrice.add(innerTabulation.getComprehensivePriceOriginal().multiply(chongDianZhuangBigDecimal));
//                }
                if ("电表".equals(innerTabulation.getFenXiFenLei())) {
                    dbzzTotalPrice = dbzzTotalPrice.add(innerTabulation.getComprehensivePriceOriginal().multiply(zhuZhaiBigDecimal));
                    dbfjTotalPrice = dbfjTotalPrice.add(innerTabulation.getComprehensivePriceOriginal().multiply(feiJuBigDecimal));
                    dbsyTotalPrice = dbsyTotalPrice.add(innerTabulation.getComprehensivePriceOriginal().multiply(shangYeBigDecimal));
                    dbcdzTotalPrice = dbcdzTotalPrice.add(innerTabulation.getComprehensivePriceOriginal().multiply(chongDianZhuangBigDecimal));
                }
                if ("电表箱".equals(innerTabulation.getFenXiFenLei())) {
                    dbxzzTotalPrice = dbxzzTotalPrice.add(innerTabulation.getComprehensivePriceOriginal().multiply(zhuZhaiBigDecimal));
                    dbxfjTotalPrice = dbxfjTotalPrice.add(innerTabulation.getComprehensivePriceOriginal().multiply(feiJuBigDecimal));
                    dbxsyTotalPrice = dbxsyTotalPrice.add(innerTabulation.getComprehensivePriceOriginal().multiply(shangYeBigDecimal));
                    dbxcdzTotalPrice = dbxcdzTotalPrice.add(innerTabulation.getComprehensivePriceOriginal().multiply(chongDianZhuangBigDecimal));
                }
                if ("母线槽".equals(innerTabulation.getFenXiFenLei())) {
                    mxcTotalPrice = mxcTotalPrice.add(innerTabulation.getTotalPriceOriginal());
                }
                if ("低压电缆".equals(innerTabulation.getFenXiFenLei())) {
                    dydlzzTotalPrice = dydlzzTotalPrice.add(innerTabulation.getComprehensivePriceOriginal().multiply(zhuZhaiBigDecimal));
                    dydlfjTotalPrice = dydlfjTotalPrice.add(innerTabulation.getComprehensivePriceOriginal().multiply(feiJuBigDecimal));
                    dydlsyTotalPrice = dydlsyTotalPrice.add(innerTabulation.getComprehensivePriceOriginal().multiply(shangYeBigDecimal));
                    dydlcdzTotalPrice = dydlcdzTotalPrice.add(innerTabulation.getComprehensivePriceOriginal().multiply(chongDianZhuangBigDecimal));
                }
                if ("配电箱".equals(innerTabulation.getFenXiFenLei())) {
                    pdxTotalPrice = pdxTotalPrice.add(innerTabulation.getTotalPriceOriginal());
                }
                if ("其他".equals(innerTabulation.getFenXiFenLei())) {
                    qtTotalPrice = qtTotalPrice.add(innerTabulation.getTotalPriceOriginal());
                }
                if ("手续费".equals(innerTabulation.getFenXiFenLei())) {
                    sxfTotalPrice = sxfTotalPrice.add(innerTabulation.getTotalPriceOriginal());
                }
            }
        } else if (innerBidBaseTabulationList != null) {
            //计算处理内线标底数据
            for (InnerBidBaseTabulation innerTabulation : innerBidBaseTabulationList) {
                BigDecimal zhuZhaiBigDecimal = innerTabulation.getZhuZhai() != null ? BigDecimal.valueOf(innerTabulation.getZhuZhai()) : BigDecimal.ZERO;
                BigDecimal feiJuBigDecimal = innerTabulation.getFeiJu() != null ? BigDecimal.valueOf(innerTabulation.getFeiJu()) : BigDecimal.ZERO;
                BigDecimal shangYeBigDecimal = innerTabulation.getShangYe() != null ? BigDecimal.valueOf(innerTabulation.getShangYe()) : BigDecimal.ZERO;
                BigDecimal chongDianZhuangBigDecimal = innerTabulation.getChongDianZhuang() != null ? BigDecimal.valueOf(innerTabulation.getChongDianZhuang()) : BigDecimal.ZERO;
                if ("变压器".equals(innerTabulation.getFenXiFenLei())) {
                    byqzzTotalPrice = byqzzTotalPrice.add(innerTabulation.getComprehensivePrice().multiply(zhuZhaiBigDecimal));
                    byqfjTotalPrice = byqfjTotalPrice.add(innerTabulation.getComprehensivePrice().multiply(feiJuBigDecimal));
                    byqsyTotalPrice = byqsyTotalPrice.add(innerTabulation.getComprehensivePrice().multiply(shangYeBigDecimal));
                    byqcdzTotalPrice = byqcdzTotalPrice.add(innerTabulation.getComprehensivePrice().multiply(chongDianZhuangBigDecimal));
                }
                if ("低压柜".equals(innerTabulation.getFenXiFenLei())) {
                    dygzzTotalPrice = dygzzTotalPrice.add(innerTabulation.getComprehensivePrice().multiply(zhuZhaiBigDecimal));
                    dygfjTotalPrice = dygfjTotalPrice.add(innerTabulation.getComprehensivePrice().multiply(feiJuBigDecimal));
                    dygsyTotalPrice = dygsyTotalPrice.add(innerTabulation.getComprehensivePrice().multiply(shangYeBigDecimal));
                    dygcdzTotalPrice = dygcdzTotalPrice.add(innerTabulation.getComprehensivePrice().multiply(chongDianZhuangBigDecimal));
                }
                if ("调试".equals(innerTabulation.getFenXiFenLei())) {
                    tsTotalPrice = tsTotalPrice.add(innerTabulation.getTotalPriceOriginal());
                }
                if ("高压电缆".equals(innerTabulation.getFenXiFenLei())) {
                    gydlTotalPrice = gydlTotalPrice.add(innerTabulation.getTotalPriceOriginal());
                }
                if ("高压柜".equals(innerTabulation.getFenXiFenLei())) {
                    gygTotalPrice = gygTotalPrice.add(innerTabulation.getTotalPriceOriginal());
                }
//                if ("电表".equals(innerTabulation.getFenXiFenLei()) || "电表箱".equals(innerTabulation.getFenXiFenLei())) {
//                    hbzzTotalPrice = hbzzTotalPrice.add(innerTabulation.getComprehensivePriceOriginal().multiply(zhuZhaiBigDecimal));
//                    hbfjTotalPrice = hbfjTotalPrice.add(innerTabulation.getComprehensivePriceOriginal().multiply(feiJuBigDecimal));
//                    hbsyTotalPrice = hbsyTotalPrice.add(innerTabulation.getComprehensivePriceOriginal().multiply(shangYeBigDecimal));
//                    hbcdzTotalPrice = hbcdzTotalPrice.add(innerTabulation.getComprehensivePriceOriginal().multiply(chongDianZhuangBigDecimal));
//                }
                if ("电表".equals(innerTabulation.getFenXiFenLei())) {
                    dbzzTotalPrice = dbzzTotalPrice.add(innerTabulation.getComprehensivePriceOriginal().multiply(zhuZhaiBigDecimal));
                    dbfjTotalPrice = dbfjTotalPrice.add(innerTabulation.getComprehensivePriceOriginal().multiply(feiJuBigDecimal));
                    dbsyTotalPrice = dbsyTotalPrice.add(innerTabulation.getComprehensivePriceOriginal().multiply(shangYeBigDecimal));
                    dbcdzTotalPrice = dbcdzTotalPrice.add(innerTabulation.getComprehensivePriceOriginal().multiply(chongDianZhuangBigDecimal));
                }
                if ("电表箱".equals(innerTabulation.getFenXiFenLei())) {
                    dbxzzTotalPrice = dbxzzTotalPrice.add(innerTabulation.getComprehensivePriceOriginal().multiply(zhuZhaiBigDecimal));
                    dbxfjTotalPrice = dbxfjTotalPrice.add(innerTabulation.getComprehensivePriceOriginal().multiply(feiJuBigDecimal));
                    dbxsyTotalPrice = dbxsyTotalPrice.add(innerTabulation.getComprehensivePriceOriginal().multiply(shangYeBigDecimal));
                    dbxcdzTotalPrice = dbxcdzTotalPrice.add(innerTabulation.getComprehensivePriceOriginal().multiply(chongDianZhuangBigDecimal));
                }
                if ("母线槽".equals(innerTabulation.getFenXiFenLei())) {
                    mxcTotalPrice = mxcTotalPrice.add(innerTabulation.getTotalPriceOriginal());
                }
                if ("低压电缆".equals(innerTabulation.getFenXiFenLei())) {
                    dydlzzTotalPrice = dydlzzTotalPrice.add(innerTabulation.getComprehensivePriceOriginal().multiply(zhuZhaiBigDecimal));
                    dydlfjTotalPrice = dydlfjTotalPrice.add(innerTabulation.getComprehensivePriceOriginal().multiply(feiJuBigDecimal));
                    dydlsyTotalPrice = dydlsyTotalPrice.add(innerTabulation.getComprehensivePriceOriginal().multiply(shangYeBigDecimal));
                    dydlcdzTotalPrice = dydlcdzTotalPrice.add(innerTabulation.getComprehensivePriceOriginal().multiply(chongDianZhuangBigDecimal));
                }
                if ("配电箱".equals(innerTabulation.getFenXiFenLei())) {
                    pdxTotalPrice = pdxTotalPrice.add(innerTabulation.getTotalPriceOriginal());
                }
                if ("其他".equals(innerTabulation.getFenXiFenLei())) {
                    qtTotalPrice = qtTotalPrice.add(innerTabulation.getTotalPriceOriginal());
                }
                if ("手续费".equals(innerTabulation.getFenXiFenLei())) {
                    sxfTotalPrice = sxfTotalPrice.add(innerTabulation.getTotalPriceOriginal());
                }
            }
        }
        vo.setGygTotalPrice(gygTotalPrice);
        vo.setDygzzTotalPrice(dygzzTotalPrice);
        vo.setDygfjTotalPrice(dygfjTotalPrice);
        vo.setDygsyTotalPrice(dygsyTotalPrice);
        vo.setDygcdzTotalPrice(dygcdzTotalPrice);
        vo.setDygTotalPriceCount(dygzzTotalPrice.add(dygfjTotalPrice).add(dygsyTotalPrice).add(dygcdzTotalPrice));
        vo.setByqzzTotalPrice(byqzzTotalPrice);
        vo.setByqfjTotalPrice(byqfjTotalPrice);
        vo.setByqsyTotalPrice(byqsyTotalPrice);
        vo.setByqcdzTotalPrice(byqcdzTotalPrice);
        vo.setByqTotalPriceCount(byqzzTotalPrice.add(byqfjTotalPrice).add(byqsyTotalPrice).add(byqcdzTotalPrice));
//        vo.setHbzzTotalPrice(hbzzTotalPrice);
//        vo.setHbfjTotalPrice(hbfjTotalPrice);
//        vo.setHbsyTotalPrice(hbsyTotalPrice);
//        vo.setHbcdzTotalPrice(hbcdzTotalPrice);
//        vo.setHbTotalPriceCount(hbzzTotalPrice.add(hbfjTotalPrice).add(hbsyTotalPrice).add(hbcdzTotalPrice));
        vo.setDbzzTotalPrice(dbzzTotalPrice);
        vo.setDbfjTotalPrice(dbfjTotalPrice);
        vo.setDbsyTotalPrice(dbsyTotalPrice);
        vo.setDbcdzTotalPrice(dbcdzTotalPrice);
        vo.setDbTotalPriceCount(dbzzTotalPrice.add(dbfjTotalPrice).add(dbsyTotalPrice).add(dbcdzTotalPrice));
        vo.setDbxzzTotalPrice(dbxzzTotalPrice);
        vo.setDbxfjTotalPrice(dbxfjTotalPrice);
        vo.setDbxsyTotalPrice(dbxsyTotalPrice);
        vo.setDbxcdzTotalPrice(dbxcdzTotalPrice);
        vo.setDbxTotalPriceCount(dbxzzTotalPrice.add(dbxfjTotalPrice).add(dbxsyTotalPrice).add(dbxcdzTotalPrice));
        vo.setDydlzzTotalPrice(dydlzzTotalPrice);
        vo.setDydlfjTotalPrice(dydlfjTotalPrice);
        vo.setDydlsyTotalPrice(dydlsyTotalPrice);
        vo.setDydlcdzTotalPrice(dydlcdzTotalPrice);
        vo.setDydlTotalPriceCount(dydlzzTotalPrice.add(dydlfjTotalPrice).add(dydlsyTotalPrice).add(dydlcdzTotalPrice));
        vo.setMxcTotalPrice(mxcTotalPrice);
        vo.setGydlTotalPrice(gydlTotalPrice);
        vo.setPdxTotalPrice(pdxTotalPrice);
        vo.setTsTotalPrice(tsTotalPrice);
        vo.setSxfTotalPrice(sxfTotalPrice);
        vo.setQtTotalPrice(qtTotalPrice);
        return vo;
    }

    /**
     * 导出投标报价纵向对比分析
     *
     * @param sortedList
     * @return
     */
    public XSSFWorkbook exportZxdb(List<VerticalStatisCollectVo> sortedList) {
        XSSFWorkbook workbook = new XSSFWorkbook();
        Sheet sheet = workbook.createSheet("投标报价横向对比分析");
        CellStyle cellStyle = workbook.createCellStyle();
        cellStyle.setAlignment(HorizontalAlignment.CENTER); // 居中
        cellStyle.setVerticalAlignment(VerticalAlignment.CENTER); // 居中
        // 创建日期格式
        CellStyle cellDateStyle = workbook.createCellStyle();
        CreationHelper createHelper = workbook.getCreationHelper();
        cellDateStyle.setDataFormat(createHelper.createDataFormat().getFormat("yyyy-mm-dd hh:mm:ss"));
        Row row0 = sheet.createRow(0);
        createCellAddStype(row0, 0, cellStyle).setCellValue("投标报价纵向对比分析（内线）");

        CellRangeAddress titleRegion = new CellRangeAddress(0, 0, 0, 20);// 下标从0开始 起始行号，终止行号， 起始列号，终
        sheet.addMergedRegionUnsafe(titleRegion);
        //边框
        cellStyle.setBorderBottom(BorderStyle.THIN); //下边框
        cellStyle.setBorderLeft(BorderStyle.THIN);//左边框
        cellStyle.setBorderTop(BorderStyle.THIN);//上边框
        cellStyle.setBorderRight(BorderStyle.THIN);//右边框
        cellDateStyle.setBorderBottom(BorderStyle.THIN); //下边框
        cellDateStyle.setBorderLeft(BorderStyle.THIN);//左边框
        cellDateStyle.setBorderTop(BorderStyle.THIN);//上边框
        cellDateStyle.setBorderRight(BorderStyle.THIN);//右边框


        if (sortedList.size() > 0) {
            Row row1 = sheet.createRow(1);
            createCellAddStype(row1, 0, cellStyle).setCellValue("内线工程");
            createCellAddStype(row1, 1, cellStyle).setCellValue("分析分类");
            createCellAddStype(row1, 2, cellStyle).setCellValue("单位");
            createCellAddStype(row1, 3, cellStyle).setCellValue(sortedList.get(0).getBiddingName());
            createCellAddStype(row1, 4, cellStyle).setCellValue(sortedList.get(0).getBiddingName());
            createCellAddStype(row1, 5, cellStyle).setCellValue(sortedList.get(0).getBiddingName());
            int indexA = 6;
            if (StringUtils.isNotEmpty(sortedList.get(0).getBiddingName1())) {
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(0).getBiddingName1());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(0).getBiddingName1());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(0).getBiddingName1());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(0).getBiddingName1());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(0).getBiddingName1());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(0).getBiddingName1());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(0).getBiddingName1());
            }
            if (StringUtils.isNotEmpty(sortedList.get(0).getBiddingName2())) {
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(0).getBiddingName2());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(0).getBiddingName2());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(0).getBiddingName2());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(0).getBiddingName2());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(0).getBiddingName2());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(0).getBiddingName2());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(0).getBiddingName2());
            }
            if (StringUtils.isNotEmpty(sortedList.get(0).getBiddingName3())) {
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(0).getBiddingName3());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(0).getBiddingName3());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(0).getBiddingName3());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(0).getBiddingName3());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(0).getBiddingName3());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(0).getBiddingName3());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(0).getBiddingName3());
            }
            if (StringUtils.isNotEmpty(sortedList.get(0).getBiddingName4())) {
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(0).getBiddingName4());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(0).getBiddingName4());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(0).getBiddingName4());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(0).getBiddingName4());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(0).getBiddingName4());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(0).getBiddingName4());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(0).getBiddingName4());
            }
            if (StringUtils.isNotEmpty(sortedList.get(0).getBiddingName5())) {
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(0).getBiddingName5());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(0).getBiddingName5());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(0).getBiddingName5());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(0).getBiddingName5());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(0).getBiddingName5());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(0).getBiddingName5());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(0).getBiddingName5());
            }
            if (StringUtils.isNotEmpty(sortedList.get(0).getBiddingName6())) {
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(0).getBiddingName6());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(0).getBiddingName6());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(0).getBiddingName6());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(0).getBiddingName6());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(0).getBiddingName6());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(0).getBiddingName6());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(0).getBiddingName6());
            }
            if (StringUtils.isNotEmpty(sortedList.get(0).getBiddingName7())) {
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(0).getBiddingName7());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(0).getBiddingName7());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(0).getBiddingName7());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(0).getBiddingName7());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(0).getBiddingName7());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(0).getBiddingName7());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(0).getBiddingName7());
            }
            if (StringUtils.isNotEmpty(sortedList.get(0).getBiddingName8())) {
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(0).getBiddingName8());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(0).getBiddingName8());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(0).getBiddingName8());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(0).getBiddingName8());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(0).getBiddingName8());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(0).getBiddingName8());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(0).getBiddingName8());
            }
            if (StringUtils.isNotEmpty(sortedList.get(0).getBiddingName9())) {
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(0).getBiddingName9());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(0).getBiddingName9());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(0).getBiddingName9());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(0).getBiddingName9());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(0).getBiddingName9());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(0).getBiddingName9());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(0).getBiddingName9());
            }
            if (StringUtils.isNotEmpty(sortedList.get(0).getBiddingName10())) {
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(0).getBiddingName10());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(0).getBiddingName10());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(0).getBiddingName10());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(0).getBiddingName10());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(0).getBiddingName10());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(0).getBiddingName10());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(0).getBiddingName10());
            }
            if (StringUtils.isNotEmpty(sortedList.get(0).getBiddingName11())) {
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(0).getBiddingName11());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(0).getBiddingName11());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(0).getBiddingName11());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(0).getBiddingName11());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(0).getBiddingName11());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(0).getBiddingName11());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(0).getBiddingName11());
            }
            if (StringUtils.isNotEmpty(sortedList.get(0).getBiddingName12())) {
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(0).getBiddingName12());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(0).getBiddingName12());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(0).getBiddingName12());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(0).getBiddingName12());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(0).getBiddingName12());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(0).getBiddingName12());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(0).getBiddingName12());
            }
            if (StringUtils.isNotEmpty(sortedList.get(0).getBiddingName13())) {
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(0).getBiddingName13());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(0).getBiddingName13());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(0).getBiddingName13());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(0).getBiddingName13());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(0).getBiddingName13());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(0).getBiddingName13());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(0).getBiddingName13());
            }
            if (StringUtils.isNotEmpty(sortedList.get(0).getBiddingName14())) {
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(0).getBiddingName14());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(0).getBiddingName14());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(0).getBiddingName14());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(0).getBiddingName14());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(0).getBiddingName14());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(0).getBiddingName14());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(0).getBiddingName14());
            }
            if (StringUtils.isNotEmpty(sortedList.get(0).getBiddingName15())) {
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(0).getBiddingName15());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(0).getBiddingName15());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(0).getBiddingName15());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(0).getBiddingName15());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(0).getBiddingName15());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(0).getBiddingName15());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(0).getBiddingName15());
            }
            if (StringUtils.isNotEmpty(sortedList.get(0).getBiddingName16())) {
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(0).getBiddingName16());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(0).getBiddingName16());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(0).getBiddingName16());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(0).getBiddingName16());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(0).getBiddingName16());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(0).getBiddingName16());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(0).getBiddingName16());
            }
            if (StringUtils.isNotEmpty(sortedList.get(0).getBiddingName17())) {
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(0).getBiddingName17());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(0).getBiddingName17());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(0).getBiddingName17());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(0).getBiddingName17());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(0).getBiddingName17());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(0).getBiddingName17());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(0).getBiddingName17());
            }
            if (StringUtils.isNotEmpty(sortedList.get(0).getBiddingName18())) {
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(0).getBiddingName18());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(0).getBiddingName18());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(0).getBiddingName18());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(0).getBiddingName18());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(0).getBiddingName18());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(0).getBiddingName18());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(0).getBiddingName18());
            }
            if (StringUtils.isNotEmpty(sortedList.get(0).getBiddingName19())) {
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(0).getBiddingName19());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(0).getBiddingName19());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(0).getBiddingName19());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(0).getBiddingName19());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(0).getBiddingName19());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(0).getBiddingName19());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(0).getBiddingName19());
            }
            if (StringUtils.isNotEmpty(sortedList.get(0).getBiddingName20())) {
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(0).getBiddingName20());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(0).getBiddingName20());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(0).getBiddingName20());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(0).getBiddingName20());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(0).getBiddingName20());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(0).getBiddingName20());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(0).getBiddingName20());
            }
        }

        Row row2 = sheet.createRow(2);
        createCellAddStype(row2, 0, cellStyle).setCellValue("内线工程");
        createCellAddStype(row2, 1, cellStyle).setCellValue("分析分类");
        createCellAddStype(row2, 2, cellStyle).setCellValue("单位");
        createCellAddStype(row2, 3, cellStyle).setCellValue("工程量");
        createCellAddStype(row2, 4, cellStyle).setCellValue("合价");
        createCellAddStype(row2, 5, cellStyle).setCellValue("综合单价");
        int indexB = 6;
        if (StringUtils.isNotEmpty(sortedList.get(0).getBiddingName1())) {
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("工程量");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("合价");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("综合单价");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("与标底差异率");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("与投标最低价差异率");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("较上一轮差异额");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("备注差异");
        }
        if (StringUtils.isNotEmpty(sortedList.get(0).getBiddingName2())) {
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("工程量");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("合价");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("综合单价");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("与标底差异率");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("与投标最低价差异率");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("较上一轮差异额");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("备注差异");
        }
        if (StringUtils.isNotEmpty(sortedList.get(0).getBiddingName3())) {
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("工程量");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("合价");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("综合单价");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("与标底差异率");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("与投标最低价差异率");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("较上一轮差异额");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("备注差异");
        }
        if (StringUtils.isNotEmpty(sortedList.get(0).getBiddingName4())) {
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("工程量");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("合价");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("综合单价");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("与标底差异率");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("与投标最低价差异率");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("较上一轮差异额");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("备注差异");
        }
        if (StringUtils.isNotEmpty(sortedList.get(0).getBiddingName5())) {
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("工程量");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("合价");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("综合单价");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("与标底差异率");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("与投标最低价差异率");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("较上一轮差异额");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("备注差异");
        }
        if (StringUtils.isNotEmpty(sortedList.get(0).getBiddingName6())) {
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("工程量");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("合价");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("综合单价");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("与标底差异率");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("与投标最低价差异率");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("较上一轮差异额");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("备注差异");
        }
        if (StringUtils.isNotEmpty(sortedList.get(0).getBiddingName7())) {
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("工程量");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("合价");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("综合单价");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("与标底差异率");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("与投标最低价差异率");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("较上一轮差异额");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("备注差异");
        }
        if (StringUtils.isNotEmpty(sortedList.get(0).getBiddingName8())) {
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("工程量");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("合价");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("综合单价");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("与标底差异率");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("与投标最低价差异率");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("较上一轮差异额");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("备注差异");
        }
        if (StringUtils.isNotEmpty(sortedList.get(0).getBiddingName9())) {
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("工程量");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("合价");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("综合单价");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("与标底差异率");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("与投标最低价差异率");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("较上一轮差异额");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("备注差异");
        }
        if (StringUtils.isNotEmpty(sortedList.get(0).getBiddingName10())) {
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("工程量");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("合价");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("综合单价");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("与标底差异率");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("与投标最低价差异率");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("较上一轮差异额");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("备注差异");
        }
        if (StringUtils.isNotEmpty(sortedList.get(0).getBiddingName11())) {
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("工程量");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("合价");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("综合单价");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("与标底差异率");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("与投标最低价差异率");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("较上一轮差异额");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("备注差异");
        }
        if (StringUtils.isNotEmpty(sortedList.get(0).getBiddingName12())) {
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("工程量");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("合价");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("综合单价");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("与标底差异率");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("与投标最低价差异率");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("较上一轮差异额");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("备注差异");
        }
        if (StringUtils.isNotEmpty(sortedList.get(0).getBiddingName13())) {
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("工程量");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("合价");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("综合单价");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("与标底差异率");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("与投标最低价差异率");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("较上一轮差异额");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("备注差异");
        }
        if (StringUtils.isNotEmpty(sortedList.get(0).getBiddingName14())) {
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("工程量");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("合价");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("综合单价");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("与标底差异率");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("与投标最低价差异率");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("较上一轮差异额");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("备注差异");
        }
        if (StringUtils.isNotEmpty(sortedList.get(0).getBiddingName15())) {
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("工程量");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("合价");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("综合单价");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("与标底差异率");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("与投标最低价差异率");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("较上一轮差异额");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("备注差异");
        }
        if (StringUtils.isNotEmpty(sortedList.get(0).getBiddingName16())) {
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("工程量");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("合价");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("综合单价");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("与标底差异率");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("与投标最低价差异率");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("较上一轮差异额");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("备注差异");
        }
        if (StringUtils.isNotEmpty(sortedList.get(0).getBiddingName17())) {
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("工程量");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("合价");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("综合单价");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("与标底差异率");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("与投标最低价差异率");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("较上一轮差异额");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("备注差异");
        }
        if (StringUtils.isNotEmpty(sortedList.get(0).getBiddingName18())) {
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("工程量");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("合价");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("综合单价");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("与标底差异率");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("与投标最低价差异率");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("较上一轮差异额");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("备注差异");
        }
        if (StringUtils.isNotEmpty(sortedList.get(0).getBiddingName19())) {
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("工程量");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("合价");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("综合单价");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("与标底差异率");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("与投标最低价差异率");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("较上一轮差异额");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("备注差异");
        }
        if (StringUtils.isNotEmpty(sortedList.get(0).getBiddingName20())) {
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("工程量");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("合价");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("综合单价");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("与标底差异率");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("与投标最低价差异率");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("较上一轮差异额");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("备注差异");
        }
        CellRangeAddress cra1 = new CellRangeAddress(1, sortedList.size() + 2, 0, 0);
        CellRangeAddress cra2 = new CellRangeAddress(1, 2, 1, 1);
        CellRangeAddress cra3 = new CellRangeAddress(1, 2, 2, 2);
        CellRangeAddress cra4 = new CellRangeAddress(1, 1, 3, 5);
        CellRangeAddress cra5 = new CellRangeAddress(1, 1, 6, 12);
        CellRangeAddress cra6 = new CellRangeAddress(1, 1, 13, 19);
        CellRangeAddress cra7 = new CellRangeAddress(1, 1, 20, 26);
        CellRangeAddress cra8 = new CellRangeAddress(1, 1, 27, 33);
        CellRangeAddress cra9 = new CellRangeAddress(1, 1, 34, 40);
        CellRangeAddress cra10 = new CellRangeAddress(1, 1, 41, 47);
        CellRangeAddress cra11 = new CellRangeAddress(1, 1, 48, 54);
        CellRangeAddress cra12 = new CellRangeAddress(1, 1, 55, 61);
        CellRangeAddress cra13 = new CellRangeAddress(1, 1, 62, 68);
        CellRangeAddress cra14 = new CellRangeAddress(1, 1, 69, 75);
        CellRangeAddress cra15 = new CellRangeAddress(1, 1, 76, 82);
        CellRangeAddress cra16 = new CellRangeAddress(1, 1, 83, 89);
        CellRangeAddress cra17 = new CellRangeAddress(1, 1, 90, 96);
        CellRangeAddress cra18 = new CellRangeAddress(1, 1, 97, 103);
        CellRangeAddress cra19 = new CellRangeAddress(1, 1, 104, 110);
        CellRangeAddress cra20 = new CellRangeAddress(1, 1, 111, 117);
        CellRangeAddress cra21 = new CellRangeAddress(1, 1, 118, 124);
        CellRangeAddress cra22 = new CellRangeAddress(1, 1, 125, 131);
        CellRangeAddress cra23 = new CellRangeAddress(1, 1, 132, 138);
        CellRangeAddress cra24 = new CellRangeAddress(1, 1, 139, 145);

        //在sheet里增加合并单元格
        sheet.addMergedRegion(cra1);
        sheet.addMergedRegion(cra2);
        sheet.addMergedRegion(cra3);
        sheet.addMergedRegion(cra4);
        sheet.addMergedRegion(cra5);
        sheet.addMergedRegion(cra6);
        sheet.addMergedRegion(cra7);
        sheet.addMergedRegion(cra8);
        sheet.addMergedRegion(cra9);
        sheet.addMergedRegion(cra10);
        sheet.addMergedRegion(cra11);
        sheet.addMergedRegion(cra12);
        sheet.addMergedRegion(cra13);
        sheet.addMergedRegion(cra14);
        sheet.addMergedRegion(cra15);
        sheet.addMergedRegion(cra16);
        sheet.addMergedRegion(cra17);
        sheet.addMergedRegion(cra18);
        sheet.addMergedRegion(cra19);
        sheet.addMergedRegion(cra20);
        sheet.addMergedRegion(cra21);
        sheet.addMergedRegion(cra22);
        sheet.addMergedRegion(cra23);
        sheet.addMergedRegion(cra24);

        Integer rowIndex = 3;
        for (VerticalStatisCollectVo item : sortedList) {
            Row row = sheet.createRow(rowIndex);
            createCellAddStype(row, 0, cellStyle).setCellValue("");
            createCellAddStype(row, 1, cellStyle).setCellValue(item.getFenXiFenLei());
            createCellAddStype(row, 2, cellStyle).setCellValue(item.getUnit());
            createCellAddStype(row, 3, cellStyle).setCellValue(item.getGongChengLiang() != null ? item.getGongChengLiang().toString() : "");
            createCellAddStype(row, 4, cellStyle).setCellValue(item.getTotalPriceCalculate() != null ? item.getTotalPriceCalculate().toString() : "0");
            createCellAddStype(row, 5, cellStyle).setCellValue(item.getComprehensivePriceCalculate() != null ? item.getComprehensivePriceCalculate().toString() : "0");
            int indexC = 6;
            if (StringUtils.isNotEmpty(sortedList.get(0).getBiddingName1())) {
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getGongChengLiang1() != null ? item.getGongChengLiang1().toString() : "");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getTotalPriceCalculate1() != null ? item.getTotalPriceCalculate1().toString() : "0");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getComprehensivePriceCalculate1() != null ? item.getComprehensivePriceCalculate1().toString() : "0");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getBiaoDi1() != null ? item.getBiaoDi1().toString() : "0");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getTouBiao1() != null ? item.getTouBiao1().toString() : "0");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getChaYiE1() != null ? item.getChaYiE1().toString() : "0");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getChaYiRemark1());
            }
            if (StringUtils.isNotEmpty(sortedList.get(0).getBiddingName2())) {
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getGongChengLiang2() != null ? item.getGongChengLiang2().toString() : "");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getTotalPriceCalculate2() != null ? item.getTotalPriceCalculate2().toString() : "0");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getComprehensivePriceCalculate2() != null ? item.getComprehensivePriceCalculate2().toString() : "0");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getBiaoDi2() != null ? item.getBiaoDi2().toString() : "0");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getTouBiao2() != null ? item.getTouBiao2().toString() : "0");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getChaYiE2() != null ? item.getChaYiE2().toString() : "0");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getChaYiRemark2());
            }
            if (StringUtils.isNotEmpty(sortedList.get(0).getBiddingName3())) {
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getGongChengLiang3() != null ? item.getGongChengLiang3().toString() : "");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getTotalPriceCalculate3() != null ? item.getTotalPriceCalculate3().toString() : "0");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getComprehensivePriceCalculate3() != null ? item.getComprehensivePriceCalculate3().toString() : "0");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getBiaoDi3() != null ? item.getBiaoDi3().toString() : "0");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getTouBiao3() != null ? item.getTouBiao3().toString() : "0");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getChaYiE3() != null ? item.getChaYiE3().toString() : "0");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getChaYiRemark3());
            }
            if (StringUtils.isNotEmpty(sortedList.get(0).getBiddingName4())) {
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getGongChengLiang4() != null ? item.getGongChengLiang4().toString() : "");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getTotalPriceCalculate4() != null ? item.getTotalPriceCalculate4().toString() : "0");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getComprehensivePriceCalculate4() != null ? item.getComprehensivePriceCalculate4().toString() : "0");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getBiaoDi4() != null ? item.getBiaoDi4().toString() : "0");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getTouBiao4() != null ? item.getTouBiao4().toString() : "0");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getChaYiE4() != null ? item.getChaYiE4().toString() : "0");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getChaYiRemark4());
            }
            if (StringUtils.isNotEmpty(sortedList.get(0).getBiddingName5())) {
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getGongChengLiang5() != null ? item.getGongChengLiang5().toString() : "");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getTotalPriceCalculate5() != null ? item.getTotalPriceCalculate5().toString() : "0");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getComprehensivePriceCalculate5() != null ? item.getComprehensivePriceCalculate5().toString() : "0");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getBiaoDi5() != null ? item.getBiaoDi5().toString() : "0");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getTouBiao5() != null ? item.getTouBiao5().toString() : "0");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getChaYiE5() != null ? item.getChaYiE5().toString() : "0");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getChaYiRemark5());
            }
            if (StringUtils.isNotEmpty(sortedList.get(0).getBiddingName6())) {
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getGongChengLiang6() != null ? item.getGongChengLiang6().toString() : "");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getTotalPriceCalculate6() != null ? item.getTotalPriceCalculate6().toString() : "0");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getComprehensivePriceCalculate6() != null ? item.getComprehensivePriceCalculate6().toString() : "0");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getBiaoDi6() != null ? item.getBiaoDi6().toString() : "0");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getTouBiao6() != null ? item.getTouBiao6().toString() : "0");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getChaYiE6() != null ? item.getChaYiE6().toString() : "0");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getChaYiRemark6());
            }
            if (StringUtils.isNotEmpty(sortedList.get(0).getBiddingName7())) {
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getGongChengLiang7() != null ? item.getGongChengLiang7().toString() : "");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getTotalPriceCalculate7() != null ? item.getTotalPriceCalculate7().toString() : "0");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getComprehensivePriceCalculate7() != null ? item.getComprehensivePriceCalculate7().toString() : "0");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getBiaoDi7() != null ? item.getBiaoDi7().toString() : "0");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getTouBiao7() != null ? item.getTouBiao7().toString() : "0");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getChaYiE7() != null ? item.getChaYiE7().toString() : "0");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getChaYiRemark7());
            }
            if (StringUtils.isNotEmpty(sortedList.get(0).getBiddingName8())) {
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getGongChengLiang8() != null ? item.getGongChengLiang8().toString() : "");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getTotalPriceCalculate8() != null ? item.getTotalPriceCalculate8().toString() : "0");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getComprehensivePriceCalculate8() != null ? item.getComprehensivePriceCalculate8().toString() : "0");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getBiaoDi8() != null ? item.getBiaoDi8().toString() : "0");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getTouBiao8() != null ? item.getTouBiao8().toString() : "0");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getChaYiE8() != null ? item.getChaYiE8().toString() : "0");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getChaYiRemark8());
            }
            if (StringUtils.isNotEmpty(sortedList.get(0).getBiddingName9())) {
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getGongChengLiang9() != null ? item.getGongChengLiang9().toString() : "");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getTotalPriceCalculate9() != null ? item.getTotalPriceCalculate9().toString() : "0");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getComprehensivePriceCalculate9() != null ? item.getComprehensivePriceCalculate9().toString() : "0");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getBiaoDi9() != null ? item.getBiaoDi9().toString() : "0");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getTouBiao9() != null ? item.getTouBiao9().toString() : "0");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getChaYiE9() != null ? item.getChaYiE9().toString() : "0");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getChaYiRemark9());
            }
            if (StringUtils.isNotEmpty(sortedList.get(0).getBiddingName10())) {
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getGongChengLiang10() != null ? item.getGongChengLiang10().toString() : "");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getTotalPriceCalculate10() != null ? item.getTotalPriceCalculate10().toString() : "0");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getComprehensivePriceCalculate10() != null ? item.getComprehensivePriceCalculate10().toString() : "0");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getBiaoDi10() != null ? item.getBiaoDi10().toString() : "0");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getTouBiao10() != null ? item.getTouBiao10().toString() : "0");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getChaYiE10() != null ? item.getChaYiE10().toString() : "0");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getChaYiRemark10());
            }
            if (StringUtils.isNotEmpty(sortedList.get(0).getBiddingName11())) {
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getGongChengLiang11() != null ? item.getGongChengLiang11().toString() : "");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getTotalPriceCalculate11() != null ? item.getTotalPriceCalculate11().toString() : "0");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getComprehensivePriceCalculate11() != null ? item.getComprehensivePriceCalculate11().toString() : "0");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getBiaoDi11() != null ? item.getBiaoDi11().toString() : "0");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getTouBiao11() != null ? item.getTouBiao11().toString() : "0");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getChaYiE11() != null ? item.getChaYiE11().toString() : "0");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getChaYiRemark11());
            }
            if (StringUtils.isNotEmpty(sortedList.get(0).getBiddingName12())) {
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getGongChengLiang12() != null ? item.getGongChengLiang12().toString() : "");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getTotalPriceCalculate12() != null ? item.getTotalPriceCalculate12().toString() : "0");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getComprehensivePriceCalculate12() != null ? item.getComprehensivePriceCalculate12().toString() : "0");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getBiaoDi12() != null ? item.getBiaoDi12().toString() : "0");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getTouBiao12() != null ? item.getTouBiao12().toString() : "0");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getChaYiE12() != null ? item.getChaYiE12().toString() : "0");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getChaYiRemark12());
            }
            if (StringUtils.isNotEmpty(sortedList.get(0).getBiddingName13())) {
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getGongChengLiang13() != null ? item.getGongChengLiang13().toString() : "");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getTotalPriceCalculate13() != null ? item.getTotalPriceCalculate13().toString() : "0");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getComprehensivePriceCalculate13() != null ? item.getComprehensivePriceCalculate13().toString() : "0");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getBiaoDi13() != null ? item.getBiaoDi13().toString() : "0");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getTouBiao13() != null ? item.getTouBiao13().toString() : "0");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getChaYiE13() != null ? item.getChaYiE13().toString() : "0");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getChaYiRemark13());
            }
            if (StringUtils.isNotEmpty(sortedList.get(0).getBiddingName14())) {
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getGongChengLiang14() != null ? item.getGongChengLiang14().toString() : "");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getTotalPriceCalculate14() != null ? item.getTotalPriceCalculate14().toString() : "0");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getComprehensivePriceCalculate14() != null ? item.getComprehensivePriceCalculate14().toString() : "0");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getBiaoDi14() != null ? item.getBiaoDi14().toString() : "0");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getTouBiao14() != null ? item.getTouBiao14().toString() : "0");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getChaYiE14() != null ? item.getChaYiE14().toString() : "0");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getChaYiRemark14());
            }
            if (StringUtils.isNotEmpty(sortedList.get(0).getBiddingName15())) {
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getGongChengLiang15() != null ? item.getGongChengLiang15().toString() : "");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getTotalPriceCalculate15() != null ? item.getTotalPriceCalculate15().toString() : "0");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getComprehensivePriceCalculate15() != null ? item.getComprehensivePriceCalculate15().toString() : "0");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getBiaoDi15() != null ? item.getBiaoDi15().toString() : "0");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getTouBiao15() != null ? item.getTouBiao15().toString() : "0");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getChaYiE15() != null ? item.getChaYiE15().toString() : "0");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getChaYiRemark15());
            }
            if (StringUtils.isNotEmpty(sortedList.get(0).getBiddingName16())) {
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getGongChengLiang16() != null ? item.getGongChengLiang16().toString() : "");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getTotalPriceCalculate16() != null ? item.getTotalPriceCalculate16().toString() : "0");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getComprehensivePriceCalculate16() != null ? item.getComprehensivePriceCalculate16().toString() : "0");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getBiaoDi16() != null ? item.getBiaoDi16().toString() : "0");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getTouBiao16() != null ? item.getTouBiao16().toString() : "0");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getChaYiE16() != null ? item.getChaYiE16().toString() : "0");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getChaYiRemark16());
            }
            if (StringUtils.isNotEmpty(sortedList.get(0).getBiddingName17())) {
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getGongChengLiang17() != null ? item.getGongChengLiang17().toString() : "");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getTotalPriceCalculate17() != null ? item.getTotalPriceCalculate17().toString() : "0");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getComprehensivePriceCalculate17() != null ? item.getComprehensivePriceCalculate17().toString() : "0");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getBiaoDi17() != null ? item.getBiaoDi17().toString() : "0");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getTouBiao17() != null ? item.getTouBiao17().toString() : "0");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getChaYiE17() != null ? item.getChaYiE17().toString() : "0");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getChaYiRemark17());
            }
            if (StringUtils.isNotEmpty(sortedList.get(0).getBiddingName18())) {
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getGongChengLiang18() != null ? item.getGongChengLiang18().toString() : "");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getTotalPriceCalculate18() != null ? item.getTotalPriceCalculate18().toString() : "0");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getComprehensivePriceCalculate18() != null ? item.getComprehensivePriceCalculate18().toString() : "0");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getBiaoDi18() != null ? item.getBiaoDi18().toString() : "0");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getTouBiao18() != null ? item.getTouBiao18().toString() : "0");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getChaYiE18() != null ? item.getChaYiE18().toString() : "0");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getChaYiRemark18());
            }
            if (StringUtils.isNotEmpty(sortedList.get(0).getBiddingName19())) {
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getGongChengLiang19() != null ? item.getGongChengLiang19().toString() : "");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getTotalPriceCalculate19() != null ? item.getTotalPriceCalculate19().toString() : "0");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getComprehensivePriceCalculate19() != null ? item.getComprehensivePriceCalculate19().toString() : "0");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getBiaoDi19() != null ? item.getBiaoDi19().toString() : "0");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getTouBiao19() != null ? item.getTouBiao19().toString() : "0");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getChaYiE19() != null ? item.getChaYiE19().toString() : "0");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getChaYiRemark19());
            }
            if (StringUtils.isNotEmpty(sortedList.get(0).getBiddingName20())) {
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getGongChengLiang20() != null ? item.getGongChengLiang20().toString() : "");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getTotalPriceCalculate20() != null ? item.getTotalPriceCalculate20().toString() : "0");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getComprehensivePriceCalculate20() != null ? item.getComprehensivePriceCalculate20().toString() : "0");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getBiaoDi20() != null ? item.getBiaoDi20().toString() : "0");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getTouBiao20() != null ? item.getTouBiao20().toString() : "0");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getChaYiE20() != null ? item.getChaYiE20().toString() : "0");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getChaYiRemark20());
            }
            rowIndex++;
        }

        return workbook;
    }


    /**
     * 导出综合单价对比分析
     *
     * @param sortedList
     * @return
     */
    public XSSFWorkbook exportZhdj(List<ComprehensiveUnitPriceCollectVo> sortedList) {
        XSSFWorkbook workbook = new XSSFWorkbook();
        Sheet sheet = workbook.createSheet("综合单价对比分析表(内线)");
        CellStyle cellStyle = workbook.createCellStyle();
        cellStyle.setAlignment(HorizontalAlignment.CENTER); // 居中
        cellStyle.setVerticalAlignment(VerticalAlignment.CENTER); // 居中
        // 创建日期格式
        CellStyle cellDateStyle = workbook.createCellStyle();
        CreationHelper createHelper = workbook.getCreationHelper();
        cellDateStyle.setDataFormat(createHelper.createDataFormat().getFormat("yyyy-mm-dd hh:mm:ss"));
        Row row0 = sheet.createRow(0);
        createCellAddStype(row0, 0, cellStyle).setCellValue("高低压配电内线工程量清单明细");

        CellRangeAddress titleRegion = new CellRangeAddress(0, 0, 0, 20);// 下标从0开始 起始行号，终止行号， 起始列号，终
        sheet.addMergedRegionUnsafe(titleRegion);
        //边框
        cellStyle.setBorderBottom(BorderStyle.THIN); //下边框
        cellStyle.setBorderLeft(BorderStyle.THIN);//左边框
        cellStyle.setBorderTop(BorderStyle.THIN);//上边框
        cellStyle.setBorderRight(BorderStyle.THIN);//右边框
        cellDateStyle.setBorderBottom(BorderStyle.THIN); //下边框
        cellDateStyle.setBorderLeft(BorderStyle.THIN);//左边框
        cellDateStyle.setBorderTop(BorderStyle.THIN);//上边框
        cellDateStyle.setBorderRight(BorderStyle.THIN);//右边框

        if (sortedList.size() > 0) {
            Row row1 = sheet.createRow(1);
            createCellAddStype(row1, 0, cellStyle).setCellValue("序号");
            createCellAddStype(row1, 1, cellStyle).setCellValue("名称");
            createCellAddStype(row1, 2, cellStyle).setCellValue("特征描述");
            createCellAddStype(row1, 3, cellStyle).setCellValue("单位");
            createCellAddStype(row1, 4, cellStyle).setCellValue("工程量");
            createCellAddStype(row1, 5, cellStyle).setCellValue("分类");
            createCellAddStype(row1, 6, cellStyle).setCellValue(sortedList.get(1).getBiddingNameC());
            createCellAddStype(row1, 7, cellStyle).setCellValue(sortedList.get(1).getBiddingNameC());
            createCellAddStype(row1, 8, cellStyle).setCellValue(sortedList.get(1).getBiddingNameC());
            createCellAddStype(row1, 9, cellStyle).setCellValue(sortedList.get(1).getBiddingNameC());
            createCellAddStype(row1, 10, cellStyle).setCellValue(sortedList.get(1).getBiddingNameC());
            createCellAddStype(row1, 11, cellStyle).setCellValue(sortedList.get(1).getBiddingNameC());
            createCellAddStype(row1, 12, cellStyle).setCellValue(sortedList.get(1).getBiddingNameC());
            createCellAddStype(row1, 13, cellStyle).setCellValue(sortedList.get(1).getBiddingNameC());
            int indexA = 14;
            if (StringUtils.isNotEmpty(sortedList.get(1).getBiddingNameC1())) {
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(1).getBiddingNameC1());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(1).getBiddingNameC1());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(1).getBiddingNameC1());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(1).getBiddingNameC1());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(1).getBiddingNameC1());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(1).getBiddingNameC1());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(1).getBiddingNameC1());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(1).getBiddingNameC1());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(1).getBiddingNameC1());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(1).getBiddingNameC1());
            }
            if (StringUtils.isNotEmpty(sortedList.get(1).getBiddingNameC2())) {
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(1).getBiddingNameC2());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(1).getBiddingNameC2());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(1).getBiddingNameC2());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(1).getBiddingNameC2());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(1).getBiddingNameC2());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(1).getBiddingNameC2());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(1).getBiddingNameC2());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(1).getBiddingNameC2());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(1).getBiddingNameC2());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(1).getBiddingNameC2());
            }
            if (StringUtils.isNotEmpty(sortedList.get(1).getBiddingNameC3())) {
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(1).getBiddingNameC3());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(1).getBiddingNameC3());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(1).getBiddingNameC3());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(1).getBiddingNameC3());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(1).getBiddingNameC3());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(1).getBiddingNameC3());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(1).getBiddingNameC3());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(1).getBiddingNameC3());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(1).getBiddingNameC3());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(1).getBiddingNameC3());
            }
            if (StringUtils.isNotEmpty(sortedList.get(1).getBiddingNameC4())) {
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(1).getBiddingNameC4());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(1).getBiddingNameC4());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(1).getBiddingNameC4());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(1).getBiddingNameC4());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(1).getBiddingNameC4());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(1).getBiddingNameC4());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(1).getBiddingNameC4());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(1).getBiddingNameC4());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(1).getBiddingNameC4());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(1).getBiddingNameC4());
            }
            if (StringUtils.isNotEmpty(sortedList.get(1).getBiddingNameC5())) {
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(1).getBiddingNameC5());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(1).getBiddingNameC5());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(1).getBiddingNameC5());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(1).getBiddingNameC5());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(1).getBiddingNameC5());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(1).getBiddingNameC5());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(1).getBiddingNameC5());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(1).getBiddingNameC5());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(1).getBiddingNameC5());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(1).getBiddingNameC5());
            }
            if (StringUtils.isNotEmpty(sortedList.get(1).getBiddingNameC6())) {
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(1).getBiddingNameC6());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(1).getBiddingNameC6());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(1).getBiddingNameC6());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(1).getBiddingNameC6());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(1).getBiddingNameC6());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(1).getBiddingNameC6());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(1).getBiddingNameC6());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(1).getBiddingNameC6());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(1).getBiddingNameC6());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(1).getBiddingNameC6());
            }
            if (StringUtils.isNotEmpty(sortedList.get(1).getBiddingNameC7())) {
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(1).getBiddingNameC7());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(1).getBiddingNameC7());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(1).getBiddingNameC7());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(1).getBiddingNameC7());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(1).getBiddingNameC7());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(1).getBiddingNameC7());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(1).getBiddingNameC7());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(1).getBiddingNameC7());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(1).getBiddingNameC7());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(1).getBiddingNameC7());
            }
            if (StringUtils.isNotEmpty(sortedList.get(1).getBiddingNameC8())) {
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(1).getBiddingNameC8());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(1).getBiddingNameC8());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(1).getBiddingNameC8());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(1).getBiddingNameC8());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(1).getBiddingNameC8());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(1).getBiddingNameC8());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(1).getBiddingNameC8());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(1).getBiddingNameC8());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(1).getBiddingNameC8());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(1).getBiddingNameC8());
            }
            if (StringUtils.isNotEmpty(sortedList.get(1).getBiddingNameC9())) {
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(1).getBiddingNameC9());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(1).getBiddingNameC9());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(1).getBiddingNameC9());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(1).getBiddingNameC9());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(1).getBiddingNameC9());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(1).getBiddingNameC9());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(1).getBiddingNameC9());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(1).getBiddingNameC9());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(1).getBiddingNameC9());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(1).getBiddingNameC9());
            }
            if (StringUtils.isNotEmpty(sortedList.get(1).getBiddingNameC10())) {
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(1).getBiddingNameC10());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(1).getBiddingNameC10());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(1).getBiddingNameC10());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(1).getBiddingNameC10());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(1).getBiddingNameC10());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(1).getBiddingNameC10());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(1).getBiddingNameC10());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(1).getBiddingNameC10());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(1).getBiddingNameC10());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(1).getBiddingNameC10());
            }
            if (StringUtils.isNotEmpty(sortedList.get(1).getBiddingNameC11())) {
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(1).getBiddingNameC11());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(1).getBiddingNameC11());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(1).getBiddingNameC11());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(1).getBiddingNameC11());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(1).getBiddingNameC11());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(1).getBiddingNameC11());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(1).getBiddingNameC11());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(1).getBiddingNameC11());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(1).getBiddingNameC11());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(1).getBiddingNameC11());
            }
            if (StringUtils.isNotEmpty(sortedList.get(1).getBiddingNameC12())) {
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(1).getBiddingNameC12());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(1).getBiddingNameC12());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(1).getBiddingNameC12());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(1).getBiddingNameC12());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(1).getBiddingNameC12());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(1).getBiddingNameC12());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(1).getBiddingNameC12());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(1).getBiddingNameC12());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(1).getBiddingNameC12());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(1).getBiddingNameC12());
            }
            if (StringUtils.isNotEmpty(sortedList.get(1).getBiddingNameC13())) {
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(1).getBiddingNameC13());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(1).getBiddingNameC13());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(1).getBiddingNameC13());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(1).getBiddingNameC13());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(1).getBiddingNameC13());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(1).getBiddingNameC13());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(1).getBiddingNameC13());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(1).getBiddingNameC13());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(1).getBiddingNameC13());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(1).getBiddingNameC13());
            }
            if (StringUtils.isNotEmpty(sortedList.get(1).getBiddingNameC14())) {
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(1).getBiddingNameC14());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(1).getBiddingNameC14());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(1).getBiddingNameC14());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(1).getBiddingNameC14());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(1).getBiddingNameC14());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(1).getBiddingNameC14());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(1).getBiddingNameC14());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(1).getBiddingNameC14());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(1).getBiddingNameC14());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(1).getBiddingNameC14());
            }
            if (StringUtils.isNotEmpty(sortedList.get(1).getBiddingNameC15())) {
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(1).getBiddingNameC15());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(1).getBiddingNameC15());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(1).getBiddingNameC15());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(1).getBiddingNameC15());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(1).getBiddingNameC15());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(1).getBiddingNameC15());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(1).getBiddingNameC15());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(1).getBiddingNameC15());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(1).getBiddingNameC15());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(1).getBiddingNameC15());
            }
            if (StringUtils.isNotEmpty(sortedList.get(1).getBiddingNameC16())) {
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(1).getBiddingNameC16());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(1).getBiddingNameC16());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(1).getBiddingNameC16());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(1).getBiddingNameC16());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(1).getBiddingNameC16());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(1).getBiddingNameC16());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(1).getBiddingNameC16());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(1).getBiddingNameC16());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(1).getBiddingNameC16());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(1).getBiddingNameC16());
            }
            if (StringUtils.isNotEmpty(sortedList.get(1).getBiddingNameC17())) {
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(1).getBiddingNameC17());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(1).getBiddingNameC17());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(1).getBiddingNameC17());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(1).getBiddingNameC17());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(1).getBiddingNameC17());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(1).getBiddingNameC17());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(1).getBiddingNameC17());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(1).getBiddingNameC17());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(1).getBiddingNameC17());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(1).getBiddingNameC17());
            }
            if (StringUtils.isNotEmpty(sortedList.get(1).getBiddingNameC18())) {
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(1).getBiddingNameC18());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(1).getBiddingNameC18());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(1).getBiddingNameC18());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(1).getBiddingNameC18());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(1).getBiddingNameC18());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(1).getBiddingNameC18());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(1).getBiddingNameC18());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(1).getBiddingNameC18());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(1).getBiddingNameC18());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(1).getBiddingNameC18());
            }
            if (StringUtils.isNotEmpty(sortedList.get(1).getBiddingNameC19())) {
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(1).getBiddingNameC19());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(1).getBiddingNameC19());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(1).getBiddingNameC19());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(1).getBiddingNameC19());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(1).getBiddingNameC19());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(1).getBiddingNameC19());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(1).getBiddingNameC19());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(1).getBiddingNameC19());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(1).getBiddingNameC19());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(1).getBiddingNameC19());
            }
            if (StringUtils.isNotEmpty(sortedList.get(1).getBiddingNameC20())) {
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(1).getBiddingNameC20());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(1).getBiddingNameC20());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(1).getBiddingNameC20());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(1).getBiddingNameC20());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(1).getBiddingNameC20());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(1).getBiddingNameC20());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(1).getBiddingNameC20());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(1).getBiddingNameC20());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(1).getBiddingNameC20());
                createCellAddStype(row1, indexA++, cellStyle).setCellValue(sortedList.get(1).getBiddingNameC20());
            }
        }

        Row row2 = sheet.createRow(2);
        createCellAddStype(row2, 0, cellStyle).setCellValue("序号");
        createCellAddStype(row2, 1, cellStyle).setCellValue("名称");
        createCellAddStype(row2, 2, cellStyle).setCellValue("特征描述");
        createCellAddStype(row2, 3, cellStyle).setCellValue("单位");
        createCellAddStype(row2, 4, cellStyle).setCellValue("工程量");
        createCellAddStype(row2, 5, cellStyle).setCellValue("分类");
        createCellAddStype(row2, 6, cellStyle).setCellValue("人工费");
        createCellAddStype(row2, 7, cellStyle).setCellValue("主材费");
        createCellAddStype(row2, 8, cellStyle).setCellValue("辅材费");
        createCellAddStype(row2, 9, cellStyle).setCellValue("机械费");
        createCellAddStype(row2, 10, cellStyle).setCellValue("企业管理费");
        createCellAddStype(row2, 11, cellStyle).setCellValue("税金");
        createCellAddStype(row2, 12, cellStyle).setCellValue("综合单价");
        createCellAddStype(row2, 13, cellStyle).setCellValue("含税合价");
        int indexB = 14;
        if (StringUtils.isNotEmpty(sortedList.get(1).getBiddingNameC1())) {
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("人工费");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("主材费");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("辅材费");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("机械费");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("企业管理费");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("税金");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("综合单价");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("含税合价");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("较标底偏离百分比");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("较本轮回标最低价偏离百分比");
        }
        if (StringUtils.isNotEmpty(sortedList.get(1).getBiddingNameC2())) {
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("人工费");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("主材费");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("辅材费");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("机械费");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("企业管理费");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("税金");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("综合单价");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("含税合价");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("较标底偏离百分比");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("较本轮回标最低价偏离百分比");
        }
        if (StringUtils.isNotEmpty(sortedList.get(1).getBiddingNameC3())) {
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("人工费");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("主材费");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("辅材费");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("机械费");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("企业管理费");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("税金");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("综合单价");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("含税合价");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("较标底偏离百分比");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("较本轮回标最低价偏离百分比");
        }
        if (StringUtils.isNotEmpty(sortedList.get(1).getBiddingNameC4())) {
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("人工费");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("主材费");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("辅材费");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("机械费");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("企业管理费");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("税金");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("综合单价");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("含税合价");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("较标底偏离百分比");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("较本轮回标最低价偏离百分比");
        }
        if (StringUtils.isNotEmpty(sortedList.get(1).getBiddingNameC5())) {
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("人工费");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("主材费");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("辅材费");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("机械费");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("企业管理费");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("税金");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("综合单价");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("含税合价");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("较标底偏离百分比");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("较本轮回标最低价偏离百分比");
        }
        if (StringUtils.isNotEmpty(sortedList.get(1).getBiddingNameC6())) {
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("人工费");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("主材费");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("辅材费");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("机械费");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("企业管理费");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("税金");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("综合单价");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("含税合价");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("较标底偏离百分比");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("较本轮回标最低价偏离百分比");
        }
        if (StringUtils.isNotEmpty(sortedList.get(1).getBiddingNameC7())) {
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("人工费");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("主材费");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("辅材费");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("机械费");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("企业管理费");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("税金");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("综合单价");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("含税合价");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("较标底偏离百分比");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("较本轮回标最低价偏离百分比");
        }
        if (StringUtils.isNotEmpty(sortedList.get(1).getBiddingNameC8())) {
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("人工费");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("主材费");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("辅材费");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("机械费");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("企业管理费");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("税金");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("综合单价");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("含税合价");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("较标底偏离百分比");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("较本轮回标最低价偏离百分比");
        }
        if (StringUtils.isNotEmpty(sortedList.get(1).getBiddingNameC9())) {
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("人工费");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("主材费");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("辅材费");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("机械费");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("企业管理费");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("税金");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("综合单价");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("含税合价");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("较标底偏离百分比");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("较本轮回标最低价偏离百分比");
        }
        if (StringUtils.isNotEmpty(sortedList.get(1).getBiddingNameC10())) {
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("人工费");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("主材费");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("辅材费");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("机械费");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("企业管理费");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("税金");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("综合单价");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("含税合价");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("较标底偏离百分比");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("较本轮回标最低价偏离百分比");
        }
        if (StringUtils.isNotEmpty(sortedList.get(1).getBiddingNameC11())) {
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("人工费");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("主材费");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("辅材费");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("机械费");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("企业管理费");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("税金");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("综合单价");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("含税合价");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("较标底偏离百分比");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("较本轮回标最低价偏离百分比");
        }
        if (StringUtils.isNotEmpty(sortedList.get(1).getBiddingNameC12())) {
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("人工费");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("主材费");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("辅材费");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("机械费");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("企业管理费");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("税金");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("综合单价");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("含税合价");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("较标底偏离百分比");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("较本轮回标最低价偏离百分比");
        }
        if (StringUtils.isNotEmpty(sortedList.get(1).getBiddingNameC13())) {
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("人工费");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("主材费");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("辅材费");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("机械费");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("企业管理费");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("税金");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("综合单价");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("含税合价");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("较标底偏离百分比");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("较本轮回标最低价偏离百分比");
        }
        if (StringUtils.isNotEmpty(sortedList.get(1).getBiddingNameC14())) {
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("人工费");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("主材费");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("辅材费");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("机械费");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("企业管理费");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("税金");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("综合单价");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("含税合价");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("较标底偏离百分比");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("较本轮回标最低价偏离百分比");
        }
        if (StringUtils.isNotEmpty(sortedList.get(1).getBiddingNameC15())) {
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("人工费");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("主材费");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("辅材费");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("机械费");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("企业管理费");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("税金");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("综合单价");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("含税合价");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("较标底偏离百分比");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("较本轮回标最低价偏离百分比");
        }
        if (StringUtils.isNotEmpty(sortedList.get(1).getBiddingNameC16())) {
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("人工费");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("主材费");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("辅材费");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("机械费");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("企业管理费");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("税金");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("综合单价");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("含税合价");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("较标底偏离百分比");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("较本轮回标最低价偏离百分比");
        }
        if (StringUtils.isNotEmpty(sortedList.get(1).getBiddingNameC17())) {
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("人工费");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("主材费");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("辅材费");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("机械费");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("企业管理费");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("税金");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("综合单价");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("含税合价");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("较标底偏离百分比");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("较本轮回标最低价偏离百分比");
        }
        if (StringUtils.isNotEmpty(sortedList.get(1).getBiddingNameC18())) {
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("人工费");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("主材费");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("辅材费");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("机械费");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("企业管理费");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("税金");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("综合单价");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("含税合价");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("较标底偏离百分比");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("较本轮回标最低价偏离百分比");
        }
        if (StringUtils.isNotEmpty(sortedList.get(1).getBiddingNameC19())) {
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("人工费");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("主材费");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("辅材费");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("机械费");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("企业管理费");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("税金");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("综合单价");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("含税合价");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("较标底偏离百分比");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("较本轮回标最低价偏离百分比");
        }
        if (StringUtils.isNotEmpty(sortedList.get(1).getBiddingNameC20())) {
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("人工费");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("主材费");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("辅材费");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("机械费");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("企业管理费");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("税金");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("综合单价");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("含税合价");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("较标底偏离百分比");
            createCellAddStype(row2, indexB++, cellStyle).setCellValue("较本轮回标最低价偏离百分比");
        }
        CellRangeAddress cra1 = new CellRangeAddress(1, 2, 0, 0);
        CellRangeAddress cra2 = new CellRangeAddress(1, 2, 1, 1);
        CellRangeAddress cra3 = new CellRangeAddress(1, 2, 2, 2);
        CellRangeAddress cra4 = new CellRangeAddress(1, 2, 3, 3);
        CellRangeAddress cra5 = new CellRangeAddress(1, 2, 4, 4);
        CellRangeAddress cra6 = new CellRangeAddress(1, 2, 5, 5);
        CellRangeAddress cra7 = new CellRangeAddress(1, 1, 6, 13);
        CellRangeAddress cra8 = new CellRangeAddress(1, 1, 14, 23);
        CellRangeAddress cra9 = new CellRangeAddress(1, 1, 24, 33);
        CellRangeAddress cra10 = new CellRangeAddress(1, 1, 34, 43);
        CellRangeAddress cra11 = new CellRangeAddress(1, 1, 44, 53);
        CellRangeAddress cra12 = new CellRangeAddress(1, 1, 54, 63);
        CellRangeAddress cra13 = new CellRangeAddress(1, 1, 64, 73);
        CellRangeAddress cra14 = new CellRangeAddress(1, 1, 74, 83);
        CellRangeAddress cra15 = new CellRangeAddress(1, 1, 84, 93);
        CellRangeAddress cra16 = new CellRangeAddress(1, 1, 94, 103);
        CellRangeAddress cra17 = new CellRangeAddress(1, 1, 104, 113);
        CellRangeAddress cra18 = new CellRangeAddress(1, 1, 114, 123);
        CellRangeAddress cra19 = new CellRangeAddress(1, 1, 124, 133);
        CellRangeAddress cra20 = new CellRangeAddress(1, 1, 134, 143);
        CellRangeAddress cra21 = new CellRangeAddress(1, 1, 144, 153);
        CellRangeAddress cra22 = new CellRangeAddress(1, 1, 154, 163);
        CellRangeAddress cra23 = new CellRangeAddress(1, 1, 164, 173);
        CellRangeAddress cra24 = new CellRangeAddress(1, 1, 174, 183);
        CellRangeAddress cra25 = new CellRangeAddress(1, 1, 184, 193);
        CellRangeAddress cra26 = new CellRangeAddress(1, 1, 194, 203);
        CellRangeAddress cra27 = new CellRangeAddress(1, 1, 204, 213);

        //在sheet里增加合并单元格
        sheet.addMergedRegion(cra1);
        sheet.addMergedRegion(cra2);
        sheet.addMergedRegion(cra3);
        sheet.addMergedRegion(cra4);
        sheet.addMergedRegion(cra5);
        sheet.addMergedRegion(cra6);
        sheet.addMergedRegion(cra7);
        sheet.addMergedRegion(cra8);
        sheet.addMergedRegion(cra9);
        sheet.addMergedRegion(cra10);
        sheet.addMergedRegion(cra11);
        sheet.addMergedRegion(cra12);
        sheet.addMergedRegion(cra13);
        sheet.addMergedRegion(cra14);
        sheet.addMergedRegion(cra15);
        sheet.addMergedRegion(cra16);
        sheet.addMergedRegion(cra17);
        sheet.addMergedRegion(cra18);
        sheet.addMergedRegion(cra19);
        sheet.addMergedRegion(cra20);
        sheet.addMergedRegion(cra21);
        sheet.addMergedRegion(cra22);
        sheet.addMergedRegion(cra23);
        sheet.addMergedRegion(cra24);
        sheet.addMergedRegion(cra25);
        sheet.addMergedRegion(cra26);
        sheet.addMergedRegion(cra27);

        Integer rowIndex = 3;
        for (ComprehensiveUnitPriceCollectVo item : sortedList) {
            Row row = sheet.createRow(rowIndex);
            createCellAddStype(row, 0, cellStyle).setCellValue(item.getCodeNumber());
            createCellAddStype(row, 1, cellStyle).setCellValue(item.getName());
            createCellAddStype(row, 2, cellStyle).setCellValue(item.getGongZuoNeiRong());
            createCellAddStype(row, 3, cellStyle).setCellValue(item.getUnit());
            createCellAddStype(row, 4, cellStyle).setCellValue(item.getGongChengLiang() != null ? item.getGongChengLiang().toString() : "");
            createCellAddStype(row, 5, cellStyle).setCellValue(item.getFenLeiName());
            createCellAddStype(row, 6, cellStyle).setCellValue(item.getRenGongCost() != null ? item.getRenGongCost().toString() : "");
            createCellAddStype(row, 7, cellStyle).setCellValue(item.getZhuCaiCost() != null ? item.getZhuCaiCost().toString() : "");
            createCellAddStype(row, 8, cellStyle).setCellValue(item.getFuCaiCost() != null ? item.getFuCaiCost().toString() : "");
            createCellAddStype(row, 9, cellStyle).setCellValue(item.getJiXieCost() != null ? item.getJiXieCost().toString() : "");
            createCellAddStype(row, 10, cellStyle).setCellValue(item.getQiYeCost() != null ? item.getQiYeCost().toString() : "");
            createCellAddStype(row, 11, cellStyle).setCellValue(item.getShuiJin() != null ? item.getShuiJin().toString() : "");
            createCellAddStype(row, 12, cellStyle).setCellValue(item.getComprehensivePrice() != null ? item.getComprehensivePrice().toString() : "0");
            createCellAddStype(row, 13, cellStyle).setCellValue(item.getTotalPrice() != null ? item.getTotalPrice().toString() : "0");
            int indexC = 14;
            if (StringUtils.isNotEmpty(sortedList.get(1).getBiddingNameC1())) {
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getRenGongCost1() != null ? item.getRenGongCost1().toString() : "");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getZhuCaiCost1() != null ? item.getZhuCaiCost1().toString() : "");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getFuCaiCost1() != null ? item.getFuCaiCost1().toString() : "");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getJiXieCost1() != null ? item.getJiXieCost1().toString() : "");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getQiYeCost1() != null ? item.getQiYeCost1().toString() : "");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getShuiJin1() != null ? item.getShuiJin1().toString() : "");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getComprehensivePrice1() != null ? item.getComprehensivePrice1().toString() : "0");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getTotalPrice1() != null ? item.getTotalPrice1().toString() : "0");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getBiaoDi1() != null ? item.getBiaoDi1().toString() : "0");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getHuiBiao1() != null ? item.getHuiBiao1().toString() : "0");
            }
            if (StringUtils.isNotEmpty(sortedList.get(1).getBiddingNameC2())) {
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getRenGongCost2() != null ? item.getRenGongCost2().toString() : "");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getZhuCaiCost2() != null ? item.getZhuCaiCost2().toString() : "");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getFuCaiCost2() != null ? item.getFuCaiCost2().toString() : "");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getJiXieCost2() != null ? item.getJiXieCost2().toString() : "");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getQiYeCost2() != null ? item.getQiYeCost2().toString() : "");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getShuiJin2() != null ? item.getShuiJin2().toString() : "");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getComprehensivePrice2() != null ? item.getComprehensivePrice2().toString() : "0");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getTotalPrice2() != null ? item.getTotalPrice2().toString() : "0");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getBiaoDi2() != null ? item.getBiaoDi2().toString() : "0");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getHuiBiao2() != null ? item.getHuiBiao2().toString() : "0");
            }
            if (StringUtils.isNotEmpty(sortedList.get(1).getBiddingNameC3())) {
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getRenGongCost3() != null ? item.getRenGongCost3().toString() : "");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getZhuCaiCost3() != null ? item.getZhuCaiCost3().toString() : "");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getFuCaiCost3() != null ? item.getFuCaiCost3().toString() : "");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getJiXieCost3() != null ? item.getJiXieCost3().toString() : "");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getQiYeCost3() != null ? item.getQiYeCost3().toString() : "");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getShuiJin3() != null ? item.getShuiJin3().toString() : "");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getComprehensivePrice3() != null ? item.getComprehensivePrice3().toString() : "0");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getTotalPrice3() != null ? item.getTotalPrice3().toString() : "0");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getBiaoDi3() != null ? item.getBiaoDi3().toString() : "0");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getHuiBiao3() != null ? item.getHuiBiao3().toString() : "0");
            }
            if (StringUtils.isNotEmpty(sortedList.get(1).getBiddingNameC4())) {
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getRenGongCost4() != null ? item.getRenGongCost4().toString() : "");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getZhuCaiCost4() != null ? item.getZhuCaiCost4().toString() : "");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getFuCaiCost4() != null ? item.getFuCaiCost4().toString() : "");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getJiXieCost4() != null ? item.getJiXieCost4().toString() : "");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getQiYeCost4() != null ? item.getQiYeCost4().toString() : "");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getShuiJin4() != null ? item.getShuiJin4().toString() : "");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getComprehensivePrice4() != null ? item.getComprehensivePrice4().toString() : "0");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getTotalPrice4() != null ? item.getTotalPrice4().toString() : "0");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getBiaoDi4() != null ? item.getBiaoDi4().toString() : "0");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getHuiBiao4() != null ? item.getHuiBiao4().toString() : "0");
            }
            if (StringUtils.isNotEmpty(sortedList.get(1).getBiddingNameC5())) {
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getRenGongCost5() != null ? item.getRenGongCost5().toString() : "");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getZhuCaiCost5() != null ? item.getZhuCaiCost5().toString() : "");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getFuCaiCost5() != null ? item.getFuCaiCost5().toString() : "");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getJiXieCost5() != null ? item.getJiXieCost5().toString() : "");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getQiYeCost5() != null ? item.getQiYeCost5().toString() : "");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getShuiJin5() != null ? item.getShuiJin5().toString() : "");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getComprehensivePrice5() != null ? item.getComprehensivePrice5().toString() : "0");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getTotalPrice5() != null ? item.getTotalPrice5().toString() : "0");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getBiaoDi5() != null ? item.getBiaoDi5().toString() : "0");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getHuiBiao5() != null ? item.getHuiBiao5().toString() : "0");
            }
            if (StringUtils.isNotEmpty(sortedList.get(1).getBiddingNameC6())) {
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getRenGongCost6() != null ? item.getRenGongCost6().toString() : "");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getZhuCaiCost6() != null ? item.getZhuCaiCost6().toString() : "");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getFuCaiCost6() != null ? item.getFuCaiCost6().toString() : "");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getJiXieCost6() != null ? item.getJiXieCost6().toString() : "");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getQiYeCost6() != null ? item.getQiYeCost6().toString() : "");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getShuiJin6() != null ? item.getShuiJin6().toString() : "");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getComprehensivePrice6() != null ? item.getComprehensivePrice6().toString() : "0");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getTotalPrice6() != null ? item.getTotalPrice6().toString() : "0");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getBiaoDi6() != null ? item.getBiaoDi6().toString() : "0");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getHuiBiao6() != null ? item.getHuiBiao6().toString() : "0");
            }
            if (StringUtils.isNotEmpty(sortedList.get(1).getBiddingNameC7())) {
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getRenGongCost7() != null ? item.getRenGongCost7().toString() : "");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getZhuCaiCost7() != null ? item.getZhuCaiCost7().toString() : "");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getFuCaiCost7() != null ? item.getFuCaiCost7().toString() : "");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getJiXieCost7() != null ? item.getJiXieCost7().toString() : "");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getQiYeCost7() != null ? item.getQiYeCost7().toString() : "");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getShuiJin7() != null ? item.getShuiJin7().toString() : "");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getComprehensivePrice7() != null ? item.getComprehensivePrice7().toString() : "0");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getTotalPrice7() != null ? item.getTotalPrice7().toString() : "0");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getBiaoDi7() != null ? item.getBiaoDi7().toString() : "0");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getHuiBiao7() != null ? item.getHuiBiao7().toString() : "0");
            }
            if (StringUtils.isNotEmpty(sortedList.get(1).getBiddingNameC8())) {
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getRenGongCost8() != null ? item.getRenGongCost8().toString() : "");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getZhuCaiCost8() != null ? item.getZhuCaiCost8().toString() : "");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getFuCaiCost8() != null ? item.getFuCaiCost8().toString() : "");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getJiXieCost8() != null ? item.getJiXieCost8().toString() : "");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getQiYeCost8() != null ? item.getQiYeCost8().toString() : "");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getShuiJin8() != null ? item.getShuiJin8().toString() : "");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getComprehensivePrice8() != null ? item.getComprehensivePrice8().toString() : "0");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getTotalPrice8() != null ? item.getTotalPrice8().toString() : "0");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getBiaoDi8() != null ? item.getBiaoDi8().toString() : "0");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getHuiBiao8() != null ? item.getHuiBiao8().toString() : "0");
            }
            if (StringUtils.isNotEmpty(sortedList.get(1).getBiddingNameC9())) {
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getRenGongCost9() != null ? item.getRenGongCost9().toString() : "");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getZhuCaiCost9() != null ? item.getZhuCaiCost9().toString() : "");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getFuCaiCost9() != null ? item.getFuCaiCost9().toString() : "");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getJiXieCost9() != null ? item.getJiXieCost9().toString() : "");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getQiYeCost9() != null ? item.getQiYeCost9().toString() : "");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getShuiJin9() != null ? item.getShuiJin9().toString() : "");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getComprehensivePrice9() != null ? item.getComprehensivePrice9().toString() : "0");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getTotalPrice9() != null ? item.getTotalPrice9().toString() : "0");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getBiaoDi9() != null ? item.getBiaoDi9().toString() : "0");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getHuiBiao9() != null ? item.getHuiBiao9().toString() : "0");
            }
            if (StringUtils.isNotEmpty(sortedList.get(1).getBiddingNameC10())) {
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getRenGongCost10() != null ? item.getRenGongCost10().toString() : "");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getZhuCaiCost10() != null ? item.getZhuCaiCost10().toString() : "");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getFuCaiCost10() != null ? item.getFuCaiCost10().toString() : "");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getJiXieCost10() != null ? item.getJiXieCost10().toString() : "");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getQiYeCost10() != null ? item.getQiYeCost10().toString() : "");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getShuiJin10() != null ? item.getShuiJin10().toString() : "");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getComprehensivePrice10() != null ? item.getComprehensivePrice10().toString() : "0");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getTotalPrice10() != null ? item.getTotalPrice10().toString() : "0");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getBiaoDi10() != null ? item.getBiaoDi10().toString() : "0");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getHuiBiao10() != null ? item.getHuiBiao10().toString() : "0");
            }
            if (StringUtils.isNotEmpty(sortedList.get(1).getBiddingNameC11())) {
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getRenGongCost11() != null ? item.getRenGongCost11().toString() : "");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getZhuCaiCost11() != null ? item.getZhuCaiCost11().toString() : "");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getFuCaiCost11() != null ? item.getFuCaiCost11().toString() : "");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getJiXieCost11() != null ? item.getJiXieCost11().toString() : "");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getQiYeCost11() != null ? item.getQiYeCost11().toString() : "");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getShuiJin11() != null ? item.getShuiJin11().toString() : "");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getComprehensivePrice11() != null ? item.getComprehensivePrice11().toString() : "0");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getTotalPrice11() != null ? item.getTotalPrice11().toString() : "0");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getBiaoDi11() != null ? item.getBiaoDi11().toString() : "0");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getHuiBiao11() != null ? item.getHuiBiao11().toString() : "0");
            }
            if (StringUtils.isNotEmpty(sortedList.get(1).getBiddingNameC12())) {
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getRenGongCost12() != null ? item.getRenGongCost12().toString() : "");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getZhuCaiCost12() != null ? item.getZhuCaiCost12().toString() : "");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getFuCaiCost12() != null ? item.getFuCaiCost12().toString() : "");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getJiXieCost12() != null ? item.getJiXieCost12().toString() : "");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getQiYeCost12() != null ? item.getQiYeCost12().toString() : "");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getShuiJin12() != null ? item.getShuiJin12().toString() : "");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getComprehensivePrice12() != null ? item.getComprehensivePrice12().toString() : "0");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getTotalPrice12() != null ? item.getTotalPrice12().toString() : "0");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getBiaoDi12() != null ? item.getBiaoDi12().toString() : "0");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getHuiBiao12() != null ? item.getHuiBiao12().toString() : "0");
            }
            if (StringUtils.isNotEmpty(sortedList.get(1).getBiddingNameC13())) {
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getRenGongCost13() != null ? item.getRenGongCost13().toString() : "");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getZhuCaiCost13() != null ? item.getZhuCaiCost13().toString() : "");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getFuCaiCost13() != null ? item.getFuCaiCost13().toString() : "");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getJiXieCost13() != null ? item.getJiXieCost13().toString() : "");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getQiYeCost13() != null ? item.getQiYeCost13().toString() : "");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getShuiJin13() != null ? item.getShuiJin13().toString() : "");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getComprehensivePrice13() != null ? item.getComprehensivePrice13().toString() : "0");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getTotalPrice13() != null ? item.getTotalPrice13().toString() : "0");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getBiaoDi13() != null ? item.getBiaoDi13().toString() : "0");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getHuiBiao13() != null ? item.getHuiBiao13().toString() : "0");
            }
            if (StringUtils.isNotEmpty(sortedList.get(1).getBiddingNameC14())) {
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getRenGongCost14() != null ? item.getRenGongCost14().toString() : "");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getZhuCaiCost14() != null ? item.getZhuCaiCost14().toString() : "");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getFuCaiCost14() != null ? item.getFuCaiCost14().toString() : "");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getJiXieCost14() != null ? item.getJiXieCost14().toString() : "");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getQiYeCost14() != null ? item.getQiYeCost14().toString() : "");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getShuiJin14() != null ? item.getShuiJin14().toString() : "");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getComprehensivePrice14() != null ? item.getComprehensivePrice14().toString() : "0");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getTotalPrice14() != null ? item.getTotalPrice14().toString() : "0");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getBiaoDi14() != null ? item.getBiaoDi14().toString() : "0");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getHuiBiao14() != null ? item.getHuiBiao14().toString() : "0");
            }
            if (StringUtils.isNotEmpty(sortedList.get(1).getBiddingNameC15())) {
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getRenGongCost15() != null ? item.getRenGongCost15().toString() : "");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getZhuCaiCost15() != null ? item.getZhuCaiCost15().toString() : "");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getFuCaiCost15() != null ? item.getFuCaiCost15().toString() : "");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getJiXieCost15() != null ? item.getJiXieCost15().toString() : "");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getQiYeCost15() != null ? item.getQiYeCost15().toString() : "");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getShuiJin15() != null ? item.getShuiJin15().toString() : "");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getComprehensivePrice15() != null ? item.getComprehensivePrice15().toString() : "0");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getTotalPrice15() != null ? item.getTotalPrice15().toString() : "0");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getBiaoDi15() != null ? item.getBiaoDi15().toString() : "0");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getHuiBiao15() != null ? item.getHuiBiao15().toString() : "0");
            }
            if (StringUtils.isNotEmpty(sortedList.get(1).getBiddingNameC16())) {
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getRenGongCost16() != null ? item.getRenGongCost16().toString() : "");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getZhuCaiCost16() != null ? item.getZhuCaiCost16().toString() : "");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getFuCaiCost16() != null ? item.getFuCaiCost16().toString() : "");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getJiXieCost16() != null ? item.getJiXieCost16().toString() : "");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getQiYeCost16() != null ? item.getQiYeCost16().toString() : "");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getShuiJin16() != null ? item.getShuiJin16().toString() : "");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getComprehensivePrice16() != null ? item.getComprehensivePrice16().toString() : "0");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getTotalPrice16() != null ? item.getTotalPrice16().toString() : "0");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getBiaoDi16() != null ? item.getBiaoDi16().toString() : "0");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getHuiBiao16() != null ? item.getHuiBiao16().toString() : "0");
            }
            if (StringUtils.isNotEmpty(sortedList.get(1).getBiddingNameC17())) {
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getRenGongCost17() != null ? item.getRenGongCost17().toString() : "");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getZhuCaiCost17() != null ? item.getZhuCaiCost17().toString() : "");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getFuCaiCost17() != null ? item.getFuCaiCost17().toString() : "");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getJiXieCost17() != null ? item.getJiXieCost17().toString() : "");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getQiYeCost17() != null ? item.getQiYeCost17().toString() : "");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getShuiJin17() != null ? item.getShuiJin17().toString() : "");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getComprehensivePrice17() != null ? item.getComprehensivePrice17().toString() : "0");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getTotalPrice17() != null ? item.getTotalPrice17().toString() : "0");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getBiaoDi17() != null ? item.getBiaoDi17().toString() : "0");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getHuiBiao17() != null ? item.getHuiBiao17().toString() : "0");
            }
            if (StringUtils.isNotEmpty(sortedList.get(1).getBiddingNameC18())) {
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getRenGongCost18() != null ? item.getRenGongCost18().toString() : "");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getZhuCaiCost18() != null ? item.getZhuCaiCost18().toString() : "");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getFuCaiCost18() != null ? item.getFuCaiCost18().toString() : "");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getJiXieCost18() != null ? item.getJiXieCost18().toString() : "");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getQiYeCost18() != null ? item.getQiYeCost18().toString() : "");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getShuiJin18() != null ? item.getShuiJin18().toString() : "");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getComprehensivePrice18() != null ? item.getComprehensivePrice18().toString() : "0");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getTotalPrice18() != null ? item.getTotalPrice18().toString() : "0");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getBiaoDi18() != null ? item.getBiaoDi18().toString() : "0");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getHuiBiao18() != null ? item.getHuiBiao18().toString() : "0");
            }
            if (StringUtils.isNotEmpty(sortedList.get(1).getBiddingNameC19())) {
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getRenGongCost19() != null ? item.getRenGongCost19().toString() : "");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getZhuCaiCost19() != null ? item.getZhuCaiCost19().toString() : "");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getFuCaiCost19() != null ? item.getFuCaiCost19().toString() : "");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getJiXieCost19() != null ? item.getJiXieCost19().toString() : "");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getQiYeCost19() != null ? item.getQiYeCost19().toString() : "");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getShuiJin19() != null ? item.getShuiJin19().toString() : "");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getComprehensivePrice19() != null ? item.getComprehensivePrice19().toString() : "0");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getTotalPrice19() != null ? item.getTotalPrice19().toString() : "0");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getBiaoDi19() != null ? item.getBiaoDi19().toString() : "0");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getHuiBiao19() != null ? item.getHuiBiao19().toString() : "0");
            }
            if (StringUtils.isNotEmpty(sortedList.get(1).getBiddingNameC20())) {
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getRenGongCost20() != null ? item.getRenGongCost20().toString() : "");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getZhuCaiCost20() != null ? item.getZhuCaiCost20().toString() : "");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getFuCaiCost20() != null ? item.getFuCaiCost20().toString() : "");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getJiXieCost20() != null ? item.getJiXieCost20().toString() : "");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getQiYeCost20() != null ? item.getQiYeCost20().toString() : "");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getShuiJin20() != null ? item.getShuiJin20().toString() : "");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getComprehensivePrice20() != null ? item.getComprehensivePrice20().toString() : "0");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getTotalPrice20() != null ? item.getTotalPrice20().toString() : "0");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getBiaoDi20() != null ? item.getBiaoDi20().toString() : "0");
                createCellAddStype(row, indexC++, cellStyle).setCellValue(item.getHuiBiao20() != null ? item.getHuiBiao20().toString() : "0");
            }
            rowIndex++;
        }

        return workbook;
    }


}
